From 6d52ef9c7e4cae7373d75e1054d5e7a6bfd6f2c4 Mon Sep 17 00:00:00 2001 From: Federico Giovanardi Date: Wed, 13 Nov 2024 09:54:04 +0100 Subject: [PATCH] Tracepointgen should handle absolute include paths 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 --- src/tools/tracepointgen/parser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/tracepointgen/parser.cpp b/src/tools/tracepointgen/parser.cpp index 88e39e0fa9a..2ea6d4ce2fd 100644 --- a/src/tools/tracepointgen/parser.cpp +++ b/src/tools/tracepointgen/parser.cpp @@ -521,9 +521,8 @@ void Parser::addIncludesRecursive(const QString &filename, QList &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);