aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-07-26 16:57:44 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-07-26 16:57:44 +0200
commitd46b40d27ebc9bcbdb4430893396f066e1f2d758 (patch)
tree28f269505091363139945284ec77dd2636a12290
parent7ead994c8a3e263c4cced6f54f0d959d32268454 (diff)
parent2269ddc60e47bfea459ef034ab1be112716b4764 (diff)
Merge 1.14 into master
-rw-r--r--changelogs/changes-1.14.0.md35
-rw-r--r--doc/reference/items/language/joblimit.qdoc2
-rw-r--r--doc/reference/items/language/rule.qdoc54
-rw-r--r--doc/reference/modules/cpp-module.qdoc12
-rw-r--r--doc/reference/modules/qbs-module.qdoc5
-rw-r--r--examples/examples.qbs3
-rw-r--r--examples/rule/lorem_ipsum.txt4
-rw-r--r--examples/rule/rule.qbs36
-rw-r--r--share/qbs/module-providers/Qt/templates/core.qbs5
-rw-r--r--share/qbs/module-providers/Qt/templates/gui.qbs6
-rw-r--r--share/qbs/modules/cpp/CppModule.qbs4
-rw-r--r--share/qbs/modules/cpp/android-gcc.qbs2
-rw-r--r--share/qbs/modules/cpp/iar.js15
-rw-r--r--src/app/qbs-setup-toolchains/clangclprobe.cpp46
-rw-r--r--src/lib/corelib/language/jsimports.h3
-rw-r--r--src/lib/corelib/language/language.cpp2
-rw-r--r--src/lib/corelib/language/resolvedfilecontext.cpp2
-rw-r--r--src/lib/corelib/tools/qttools.h15
-rw-r--r--src/plugins/scanner/cpp/cppscanner.cpp16
-rw-r--r--tests/auto/api/tst_api.cpp6
20 files changed, 208 insertions, 65 deletions
diff --git a/changelogs/changes-1.14.0.md b/changelogs/changes-1.14.0.md
new file mode 100644
index 000000000..860578a15
--- /dev/null
+++ b/changelogs/changes-1.14.0.md
@@ -0,0 +1,35 @@
+# Language
+* The `PathProbe` item was extended to support looking for multiple files and filtering candidate
+ files.
+
+# C/C++ Support
+* Added support for Visual Studio 2019.
+* Added support for clang-cl.
+* Various improvements for bare-metal toolchains, including new example projects and support for
+ the SDCC toolchain.
+
+# Qt Support
+* Added the `Qt.android_support.extraLibs` property.
+
+# Other modules
+* The `pkgconfig` module now has a `sysroot` property.
+* Added gRPC support to the `protobuf.cpp` module.
+
+# Android Support
+* Removed support for NDK < r19.
+* Added new `Android.sdk` properties `versionCode` and `versionName`.
+
+# Infrastructure
+* Added configuration files for Travis CI.
+* Various fixes and improvements in the Debian Docker image; updated to to Qt 5.11.3.
+
+# Contributors
+* BogDan Vatra <bogdan@kde.org>
+* Christian Kandeler <christian.kandeler@qt.io>
+* Christian Stenger <christian.stenger@qt.io>
+* Davide Pesavento <pesa@gentoo.org>
+* Denis Shienkov <denis.shienkov@gmail.com>
+* hjk <hjk@qt.io>
+* Ivan Komissarov <ABBAPOH@gmail.com>
+* Joerg Bornemann <joerg.bornemann@qt.io>
+* Richard Weickelt <richard@weickelt.de>
diff --git a/doc/reference/items/language/joblimit.qdoc b/doc/reference/items/language/joblimit.qdoc
index 66697ba3e..cd68bae31 100644
--- a/doc/reference/items/language/joblimit.qdoc
+++ b/doc/reference/items/language/joblimit.qdoc
@@ -79,7 +79,7 @@
*/
/*!
- \qmlproperty string JobLimit::jobCount
+ \qmlproperty int JobLimit::jobCount
The maximum number of commands in the given \l{jobPool}{job pool} that can run
concurrently.
diff --git a/doc/reference/items/language/rule.qdoc b/doc/reference/items/language/rule.qdoc
index 3a14c2fa6..62a32caf5 100644
--- a/doc/reference/items/language/rule.qdoc
+++ b/doc/reference/items/language/rule.qdoc
@@ -45,30 +45,28 @@
The following rule takes text files and replaces Windows-style line endings with their
Unix-style counterparts. We will look at it one piece at a time.
- \code
- Rule {
- multiplex: false
- \endcode
+ \quotefromfile ../examples/rule/rule.qbs
+
+ \skipto Rule
+ \printuntil multiplex: false
+
A \e {multiplex rule} creates one transformer that takes all input artifacts with the
matching input file tag and creates one or more output artifacts. We are setting the
respective property to \c false here, indicating that we want to create one transformer
per input file.
\note This is actually the default, so the above assignment is not required.
- \code
- inputs: ["txt_input"]
- \endcode
+
+ \printuntil inputs: ["txt_input"]
+
Here we are specifying that our rule is interested in input files that have the tag
\c "txt_input". Such files could be source files, in which case you would tag them
using a \l{Group}. Or they could in turn get generated by a different rule,
in which case that rule would assign the file tag.
The files matching the tag will be available in the \l{prepare} script under the name
\c inputs (see \l{inputs and outputs}{The inputs and outputs Variables}).
- \code
- Artifact {
- filePath: input.fileName + ".out"
- fileTags: ["txt_output"]
- }
- \endcode
+
+ \printuntil }
+
Here we are specifying that for every input file, we want to create one output file
whose name is the same as the input file, but with an additional extension. Because we are
giving a relative path, \QBS will prepend that path by the product's build directory.
@@ -82,24 +80,8 @@
\l Artifact items. The set of output artifacts will be available in the prepare script
under the name \c outputs (see \l{inputs and outputs}{The inputs and outputs Variables}).
- \code
- prepare: {
- var cmd = new JavaScriptCommand();
- cmd.description = input.fileName + "->" + output.fileName;
- cmd.highlight = "codegen";
- cmd.sourceCode = function() {
- var file = new TextFile(input.filePath);
- var content = file.readAll();
- file.close()
- content = content.replace(/\r\n/g, "\n");
- file = new TextFile(output.filePath, TextFile.WriteOnly);
- file.write(content);
- file.close();
- }
- return [cmd];
- }
- }
- \endcode
+ \printuntil /^\s{4}\}/
+
The prepare script shown above puts everything together by creating the command that does
the actual transformation of the file contents, employing the help of the
\l{TextFile Service}{TextFile} class.
@@ -184,6 +166,16 @@
our executable.
\endlist
+ \section1 A Complete Example
+
+ The following code snippet shows a single \l{Rule} within a \l{Product} and summarizes the
+ previous sections.
+
+ \note The product's type is set up to the \c "txt_output" file tag to tell \QBS that the
+ product depends on output artifacts produced by the custom rule. Otherwise the rule would not
+ be executed.
+
+ \quotefile ../examples/rule/rule.qbs
*/
/*!
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc
index f69f07239..9f554dc1c 100644
--- a/doc/reference/modules/cpp-module.qdoc
+++ b/doc/reference/modules/cpp-module.qdoc
@@ -1090,9 +1090,12 @@
Passes \c{-miphoneos-version-min=<version>} to the compiler.
- If left undefined, compiler defaults will be used.
+ If set to undefined, compiler defaults will be used.
- \nodefaultvalue
+ \note \QBS sets minimum version to \c "6.0" for \c armv7a because earlier iOS versions are
+ broken in recent XCode installations.
+
+ \defaultvalue \c "6.0" for \c armv7a, \c undefined otherwise
*/
/*!
@@ -1146,7 +1149,10 @@
If left undefined, compiler defaults will be used.
- \nodefaultvalue
+ \note \QBS sets the minimum version to \c "6.0", because earlier tvOS
+ versions are not supported by recent XCode installations by default.
+
+ \defaultvalue \c "6.0
*/
/*!
diff --git a/doc/reference/modules/qbs-module.qdoc b/doc/reference/modules/qbs-module.qdoc
index 9e7cc8c3c..c1a0b2532 100644
--- a/doc/reference/modules/qbs-module.qdoc
+++ b/doc/reference/modules/qbs-module.qdoc
@@ -640,8 +640,7 @@
The architectures the product will be built for.
- \defaultvalue \c{["armv5te"]} on Android, same as Xcode on Apple platforms,
- otherwise equivalent to \l{qbs::architecture}{[qbs.architecture]}.
+ \nodefaultvalue
*/
/*!
@@ -650,7 +649,7 @@
The build variants the product will be built for.
- \defaultvalue Equivalent to \l{qbs::buildVariant}{[qbs.buildVariant]}.
+ \nodefaultvalue
*/
/*!
diff --git a/examples/examples.qbs b/examples/examples.qbs
index abb6d5d9a..ff6e7a191 100644
--- a/examples/examples.qbs
+++ b/examples/examples.qbs
@@ -65,6 +65,7 @@ Project {
"install-bundle/install-bundle.qbs",
"protobuf/cpp/addressbook.qbs",
"protobuf/objc/addressbook.qbs",
- "baremetal/baremetal.qbs"
+ "baremetal/baremetal.qbs",
+ "rule/rule.qbs",
]
}
diff --git a/examples/rule/lorem_ipsum.txt b/examples/rule/lorem_ipsum.txt
new file mode 100644
index 000000000..2901fbcee
--- /dev/null
+++ b/examples/rule/lorem_ipsum.txt
@@ -0,0 +1,4 @@
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer accumsan laoreet magna vitae
+elementum. Duis semper ex pellentesque nibh ullamcorper lacinia. Suspendisse sed diam magna.
+Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In id
+maximus turpis, mattis commodo mauris. Sed bibendum accumsan leo. Nulla placerat.
diff --git a/examples/rule/rule.qbs b/examples/rule/rule.qbs
new file mode 100644
index 000000000..8ec14ee40
--- /dev/null
+++ b/examples/rule/rule.qbs
@@ -0,0 +1,36 @@
+import qbs.TextFile
+
+Product {
+ type: "txt_output"
+
+ Group {
+ name: "lorem_ipsum"
+ files: "lorem_ipsum.txt"
+ fileTags: "txt_input"
+ }
+
+ //![1]
+ Rule {
+ multiplex: false
+ inputs: ["txt_input"]
+ Artifact {
+ filePath: input.fileName + ".out"
+ fileTags: ["txt_output"]
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.description = input.fileName + "->" + output.fileName;
+ cmd.highlight = "codegen";
+ cmd.sourceCode = function() {
+ var file = new TextFile(input.filePath);
+ var content = file.readAll();
+ file.close()
+ content = content.toUpperCase();
+ file = new TextFile(output.filePath, TextFile.WriteOnly);
+ file.write(content);
+ file.close();
+ }
+ return [cmd];
+ }
+ }
+}
diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs
index 63d9a4cb5..98bc0c4d3 100644
--- a/share/qbs/module-providers/Qt/templates/core.qbs
+++ b/share/qbs/module-providers/Qt/templates/core.qbs
@@ -90,6 +90,7 @@ Module {
? libFilePathDebug : libFilePathRelease
property stringList coreLibPaths: @libraryPaths@
+ property bool hasLibrary: true
// These are deliberately not path types
// We don't want to resolve them against the source directory
@@ -105,10 +106,6 @@ Module {
cpp.linkerVariant: "gold"
}
- cpp.entryPoint: qbs.targetOS.containsAny(["ios", "tvos"])
- && Utilities.versionCompare(version, "5.6.0") >= 0
- ? "_qt_main_wrapper"
- : undefined
cpp.cxxLanguageVersion: Utilities.versionCompare(version, "5.7.0") >= 0 ? "c++11" : original
cpp.enableCompilerDefinesByLanguage: ["cpp"].concat(
qbs.targetOS.contains("darwin") ? ["objcpp"] : [])
diff --git a/share/qbs/module-providers/Qt/templates/gui.qbs b/share/qbs/module-providers/Qt/templates/gui.qbs
index eb69e0cad..a3c427175 100644
--- a/share/qbs/module-providers/Qt/templates/gui.qbs
+++ b/share/qbs/module-providers/Qt/templates/gui.qbs
@@ -1,5 +1,6 @@
import qbs.FileInfo
import qbs.ModUtils
+import qbs.Utilities
import '../QtModule.qbs' as QtModule
QtModule {
@@ -50,6 +51,11 @@ QtModule {
libFilePathRelease: @libFilePathRelease@
pluginTypes: @pluginTypes@
+ cpp.entryPoint: qbs.targetOS.containsAny(["ios", "tvos"])
+ && Utilities.versionCompare(version, "5.6.0") >= 0
+ ? "_qt_main_wrapper"
+ : undefined
+
cpp.defines: @defines@
cpp.includePaths: @includes@
cpp.libraryPaths: @libraryPaths@
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs
index 35a5de4f0..200d91d09 100644
--- a/share/qbs/modules/cpp/CppModule.qbs
+++ b/share/qbs/modules/cpp/CppModule.qbs
@@ -104,7 +104,7 @@ Module {
to the compiler. if undefined, compiler defaults will be used."
}
- property string minimumIosVersion
+ property string minimumIosVersion: qbs.architecture == "armv7a" ? "6.0" : undefined
PropertyOptions {
name: "minimumIosVersion"
description: "a version number in the format [major].[minor] indicating the earliest \
@@ -120,7 +120,7 @@ Module {
defaults will be used."
}
- property string minimumTvosVersion
+ property string minimumTvosVersion: "6.0"
PropertyOptions {
name: "minimumTvosVersion"
description: "a version number in the format [major].[minor] indicating the earliest \
diff --git a/share/qbs/modules/cpp/android-gcc.qbs b/share/qbs/modules/cpp/android-gcc.qbs
index ad55d8191..3e44f4ff3 100644
--- a/share/qbs/modules/cpp/android-gcc.qbs
+++ b/share/qbs/modules/cpp/android-gcc.qbs
@@ -147,7 +147,7 @@ LinuxGCC {
binutilsPath: FileInfo.joinPaths(Android.ndk.ndkDir, "toolchains", "llvm", "prebuilt",
Android.ndk.hostArch, "bin");
- binutilsPathPrefix: "llvm-"
+ binutilsPathPrefix: FileInfo.joinPaths(binutilsPath, "llvm-")
syslibroot: FileInfo.joinPaths(Android.ndk.ndkDir, "platforms",
Android.ndk.platform, "arch-"
+ NdkUtils.abiNameToDirName(Android.ndk.abi))
diff --git a/share/qbs/modules/cpp/iar.js b/share/qbs/modules/cpp/iar.js
index 60cb72343..ddaa00e2d 100644
--- a/share/qbs/modules/cpp/iar.js
+++ b/share/qbs/modules/cpp/iar.js
@@ -58,6 +58,17 @@ function guessEndianness(macros)
return "big"
}
+function cppLanguageOption(compilerFilePath)
+{
+ var baseName = FileInfo.baseName(compilerFilePath);
+ if (baseName === "iccarm")
+ return "--c++";
+ if (baseName === "icc8051" || baseName === "iccavr")
+ return "--ec++";
+ throw "Unable to deduce C++ language option for unsupported compiler: '"
+ + FileInfo.toNativeSeparators(compilerFilePath) + "'";
+}
+
function dumpMacros(compilerFilePath, tag) {
var tempDir = new TemporaryDir();
var inFilePath = FileInfo.fromNativeSeparators(tempDir.path() + "/empty-source.c");
@@ -66,7 +77,7 @@ function dumpMacros(compilerFilePath, tag) {
var args = [ inFilePath, "--predef_macros", outFilePath ];
if (tag && tag === "cpp")
- args.push("--c++");
+ args.push(cppLanguageOption(compilerFilePath));
var p = new Process();
p.exec(compilerFilePath, args, true);
@@ -86,7 +97,7 @@ function dumpDefaultPaths(compilerFilePath, tag) {
var args = [ inFilePath, "--preinclude", "." ];
if (tag === "cpp")
- args.push("--c++");
+ args.push(cppLanguageOption(compilerFilePath));
var p = new Process();
// This process should return an error, don't throw
diff --git a/src/app/qbs-setup-toolchains/clangclprobe.cpp b/src/app/qbs-setup-toolchains/clangclprobe.cpp
index a54705510..816d28546 100644
--- a/src/app/qbs-setup-toolchains/clangclprobe.cpp
+++ b/src/app/qbs-setup-toolchains/clangclprobe.cpp
@@ -117,6 +117,46 @@ QString findCompatibleVcsarsallBat()
return {};
}
+QString wow6432Key()
+{
+#ifdef Q_OS_WIN64
+ return QStringLiteral("\\Wow6432Node");
+#else
+ return {};
+#endif
+}
+
+QString findClangCl()
+{
+ const auto compilerName = HostOsInfo::appendExecutableSuffix(QStringLiteral("clang-cl"));
+ const auto compilerFromPath = findExecutable(compilerName);
+ if (!compilerFromPath.isEmpty())
+ return compilerFromPath;
+
+ const QSettings registry(
+ QStringLiteral("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\LLVM\\LLVM").arg(wow6432Key()),
+ QSettings::NativeFormat);
+ const auto key = QStringLiteral(".");
+ if (registry.contains(key)) {
+ const auto compilerPath = QDir::fromNativeSeparators(registry.value(key).toString())
+ + QStringLiteral("/bin/") + compilerName;
+ if (QFileInfo(compilerPath).exists())
+ return compilerPath;
+ }
+
+ // this branch can be useful in case user had two LLVM installations (e.g. 32bit & 64bit)
+ // but uninstalled one - in that case, registry will be empty
+ static const char * const envVarCandidates[] = {"ProgramFiles", "ProgramFiles(x86)"};
+ for (const auto &envVar : envVarCandidates) {
+ const auto value
+ = QDir::fromNativeSeparators(QString::fromLocal8Bit(qgetenv(envVar)));
+ const auto compilerPath = value + QStringLiteral("/LLVM/bin/") + compilerName;
+ if (QFileInfo(compilerPath).exists())
+ return compilerPath;
+ }
+ return {};
+}
+
} // namespace
void createClangClProfile(const QFileInfo &compiler, Settings *settings,
@@ -144,12 +184,12 @@ void clangClProbe(Settings *settings, QList<Profile> &profiles)
{
const auto compilerName = QStringLiteral("clang-cl");
qbsInfo() << Tr::tr("Trying to detect %1...").arg(compilerName);
- const QFileInfo compiler = findExecutable(HostOsInfo::appendExecutableSuffix(compilerName));
- if (!compiler.exists()) {
+ const QString compilerFilePath = findClangCl();
+ if (compilerFilePath.isEmpty()) {
qbsInfo() << Tr::tr("%1 was not found.").arg(compilerName);
return;
}
-
+ const QFileInfo compiler(compilerFilePath);
const auto vcvarsallPath = findCompatibleVcsarsallBat();
if (vcvarsallPath.isEmpty()) {
qbsWarning()
diff --git a/src/lib/corelib/language/jsimports.h b/src/lib/corelib/language/jsimports.h
index ebde70b7b..a892e0ec0 100644
--- a/src/lib/corelib/language/jsimports.h
+++ b/src/lib/corelib/language/jsimports.h
@@ -42,6 +42,7 @@
#include <tools/codelocation.h>
#include <tools/persistence.h>
+#include <tools/qttools.h>
#include <QtCore/qhash.h>
#include <QtCore/qstringlist.h>
@@ -79,7 +80,7 @@ inline bool operator<(const JsImport &lhs, const JsImport &rhs)
inline bool operator==(const JsImport &jsi1, const JsImport &jsi2)
{
- return jsi1.scopeName == jsi2.scopeName && jsi1.filePaths.toSet() == jsi2.filePaths.toSet();
+ return jsi1.scopeName == jsi2.scopeName && toSet(jsi1.filePaths) == toSet(jsi2.filePaths);
}
using JsImports = std::vector<JsImport>;
diff --git a/src/lib/corelib/language/language.cpp b/src/lib/corelib/language/language.cpp
index d888700c5..40549b836 100644
--- a/src/lib/corelib/language/language.cpp
+++ b/src/lib/corelib/language/language.cpp
@@ -241,7 +241,7 @@ bool operator==(const ResolvedModule &m1, const ResolvedModule &m2)
{
return m1.name == m2.name
&& m1.isProduct == m2.isProduct
- && m1.moduleDependencies.toSet() == m2.moduleDependencies.toSet()
+ && toSet(m1.moduleDependencies) == toSet(m2.moduleDependencies)
&& m1.setupBuildEnvironmentScript == m2.setupBuildEnvironmentScript
&& m1.setupRunEnvironmentScript == m2.setupRunEnvironmentScript;
}
diff --git a/src/lib/corelib/language/resolvedfilecontext.cpp b/src/lib/corelib/language/resolvedfilecontext.cpp
index f1151f98f..db63a8ef4 100644
--- a/src/lib/corelib/language/resolvedfilecontext.cpp
+++ b/src/lib/corelib/language/resolvedfilecontext.cpp
@@ -53,7 +53,7 @@ ResolvedFileContext::ResolvedFileContext(const FileContextBase &ctx)
bool operator==(const ResolvedFileContext &a, const ResolvedFileContext &b)
{
return a.filePath() == b.filePath()
- && a.jsExtensions().toSet() == b.jsExtensions().toSet()
+ && toSet(a.jsExtensions()) == toSet(b.jsExtensions())
&& sorted(a.jsImports()) == sorted(b.jsImports());
}
diff --git a/src/lib/corelib/tools/qttools.h b/src/lib/corelib/tools/qttools.h
index b465e3d9e..c3b4d3a9f 100644
--- a/src/lib/corelib/tools/qttools.h
+++ b/src/lib/corelib/tools/qttools.h
@@ -70,4 +70,19 @@ uint qHash(const QStringList &list);
uint qHash(const QProcessEnvironment &env);
QT_END_NAMESPACE
+namespace qbs {
+
+template <class T>
+QSet<T> toSet(const QList<T> &list)
+{
+#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
+ return list.toSet();
+#else
+ return QSet<T>(list.begin(), list.end());
+#endif
+}
+
+} // namespace qbs
+
+
#endif // QBSQTTOOLS_H
diff --git a/src/plugins/scanner/cpp/cppscanner.cpp b/src/plugins/scanner/cpp/cppscanner.cpp
index 067127d00..cbab8a012 100644
--- a/src/plugins/scanner/cpp/cppscanner.cpp
+++ b/src/plugins/scanner/cpp/cppscanner.cpp
@@ -126,7 +126,7 @@ public:
{
}
- bool equals(const Token &tk, const QLatin1Literal &literal) const
+ bool equals(const Token &tk, const QLatin1String &literal) const
{
return static_cast<int>(tk.length()) == literal.size()
&& memcmp(m_fileContent + tk.begin(), literal.data(), literal.size()) == 0;
@@ -136,13 +136,13 @@ public:
static void scanCppFile(void *opaq, CPlusPlus::Lexer &yylex, bool scanForFileTags,
bool scanForDependencies)
{
- const QLatin1Literal includeLiteral("include");
- const QLatin1Literal importLiteral("import");
- const QLatin1Literal defineLiteral("define");
- const QLatin1Literal qobjectLiteral("Q_OBJECT");
- const QLatin1Literal qgadgetLiteral("Q_GADGET");
- const QLatin1Literal qnamespaceLiteral("Q_NAMESPACE");
- const QLatin1Literal pluginMetaDataLiteral("Q_PLUGIN_METADATA");
+ const QLatin1String includeLiteral("include");
+ const QLatin1String importLiteral("import");
+ const QLatin1String defineLiteral("define");
+ const QLatin1String qobjectLiteral("Q_OBJECT");
+ const QLatin1String qgadgetLiteral("Q_GADGET");
+ const QLatin1String qnamespaceLiteral("Q_NAMESPACE");
+ const QLatin1String pluginMetaDataLiteral("Q_PLUGIN_METADATA");
const auto opaque = static_cast<Opaq *>(opaq);
const TokenComparator tc(opaque->fileContent);
Token tk;
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index 6313827fa..aac0f3e7e 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -2652,7 +2652,7 @@ void TestApi::restoredWarnings()
waitForFinished(job.get());
QVERIFY2(!job->error().hasError(), qPrintable(job->error().toString()));
job.reset(nullptr);
- QCOMPARE(m_logSink->warnings.toSet().size(), 2);
+ QCOMPARE(toSet(m_logSink->warnings).size(), 2);
const auto beforeErrors = m_logSink->warnings;
for (const qbs::ErrorInfo &e : beforeErrors) {
const QString msg = e.toString();
@@ -2667,7 +2667,7 @@ void TestApi::restoredWarnings()
waitForFinished(job.get());
QVERIFY2(!job->error().hasError(), qPrintable(job->error().toString()));
job.reset(nullptr);
- QCOMPARE(m_logSink->warnings.toSet().size(), 2);
+ QCOMPARE(toSet(m_logSink->warnings).size(), 2);
m_logSink->warnings.clear();
// Re-resolving with changes: Errors come from the re-resolving, stored ones must be suppressed.
@@ -2678,7 +2678,7 @@ void TestApi::restoredWarnings()
waitForFinished(job.get());
QVERIFY2(!job->error().hasError(), qPrintable(job->error().toString()));
job.reset(nullptr);
- QCOMPARE(m_logSink->warnings.toSet().size(), 3); // One more for the additional group
+ QCOMPARE(toSet(m_logSink->warnings).size(), 3); // One more for the additional group
const auto afterErrors = m_logSink->warnings;
for (const qbs::ErrorInfo &e : afterErrors) {
const QString msg = e.toString();