Suppress warnings in moc_*.cpp files.

This commit is contained in:
Roman Telezhynskyi 2023-02-16 08:57:11 +02:00
parent 505cd6d62f
commit 12f4a006fd

View File

@ -804,36 +804,38 @@ Module {
} }
Properties { Properties {
condition: Utilities.versionCompare(qbs.version, "1.22") < 0
cpp.systemIncludePaths: { cpp.systemIncludePaths: {
var qtLibs = [ var paths = [FileInfo.joinPaths(product.buildDirectory, "qt.headers")];
"QtCore",
"QtSvg",
"QtXml",
"QtPrintSupport",
"QtXmlPatterns",
"QtWidgets",
"QtGui",
"QtNetwork",
"QtTest",
"QtConcurrent"
];
var paths = []; if (Utilities.versionCompare(qbs.version, "1.22") < 0) {
var qtLibs = [
"QtCore",
"QtSvg",
"QtXml",
"QtPrintSupport",
"QtXmlPatterns",
"QtWidgets",
"QtGui",
"QtNetwork",
"QtTest",
"QtConcurrent"
];
if (!qbs.targetOS.contains("macos")) if (!qbs.targetOS.contains("macos"))
{ {
paths.push(Qt.core.incPath); paths.push(Qt.core.incPath);
for (var i = 0; i < qtLibs.length; i++) { for (var i = 0; i < qtLibs.length; i++) {
paths.push(FileInfo.joinPaths(Qt.core.incPath, qtLibs[i])); paths.push(FileInfo.joinPaths(Qt.core.incPath, qtLibs[i]));
} }
} else { } else {
for (var i = 0; i < qtLibs.length; i++) { for (var i = 0; i < qtLibs.length; i++) {
paths.push(FileInfo.joinPaths(Qt.core.incPath, qtLibs[i] + ".framework/Versions/" + Qt.core.versionMajor + paths.push(FileInfo.joinPaths(Qt.core.incPath,
"/Headers")); qtLibs[i] + ".framework/Versions/" + Qt.core.versionMajor +
paths.push(FileInfo.joinPaths(Qt.core.incPath, qtLibs[i] + ".framework/Headers")); "/Headers"));
paths.push(FileInfo.joinPaths(Qt.core.incPath, qtLibs[i] + ".framework/Headers"));
}
} }
} }