Skip to content

Commit

Permalink
Tracepointgen should handle absolute include paths
Browse files Browse the repository at this point in the history
If building within Yocto with lttng enabled syncqt's generated headers
will contain full paths, so the check for `startWith('Q')` must check
the basename only

Change-Id: I0c3621b2b5062c085ffa0b70c7f16ff9c16c26b7
Reviewed-by: Alexey Edelev <[email protected]>
  • Loading branch information
Federico Giovanardi committed Nov 15, 2024
1 parent 5d6f12e commit 6d52ef9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tools/tracepointgen/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,8 @@ void Parser::addIncludesRecursive(const QString &filename, QList<QString> &inclu
rinc = info2.absoluteFilePath();
filename = info2.fileName();
}

// only search possible qt headers
if (filename.startsWith(QLatin1Char('q'), Qt::CaseInsensitive)) {
if (QFileInfo(filename).baseName().startsWith(QLatin1Char('q'), Qt::CaseInsensitive)) {
QString resolved = resolveInclude(rinc);
if (!resolved.isEmpty() && !includes.contains(resolved)) {
includes.push_back(resolved);
Expand Down

0 comments on commit 6d52ef9

Please sign in to comment.