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 <alexey.edelev@qt.io>
This commit is contained in:
Federico Giovanardi 2024-11-13 09:54:04 +01:00
parent 5d6f12e6ec
commit 6d52ef9c7e

View File

@ -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);