From 95f859c3a65e2ea5d2594a4e754ae1c215b54727 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 11 Dec 2024 17:26:24 +0200 Subject: [PATCH] Use QStringBuilder Change-Id: Id09db3b28beb1dbe718f1bb00eba1b05c33445bc Reviewed-by: Christian Kandeler --- cmake/QbsBuildConfig.cmake | 5 +- qbs-resources/imports/QbsProduct.qbs | 1 + src/app/qbs-setup-toolchains/clangclprobe.cpp | 3 +- src/lib/corelib/generators/generator.cpp | 7 ++- .../corelib/loader/moduleproviderloader.cpp | 2 +- src/lib/corelib/loader/productscollector.cpp | 7 ++- src/lib/corelib/tools/msvcinfo.cpp | 4 +- .../archs/arm/armlinkersettingsgroup_v8.cpp | 5 +- .../archs/avr/avrlinkersettingsgroup_v7.cpp | 2 +- .../mcs51/mcs51linkersettingsgroup_v10.cpp | 2 +- .../msp430/msp430linkersettingsgroup_v7.cpp | 2 +- .../archs/stm8/stm8linkersettingsgroup_v3.cpp | 2 +- src/plugins/generator/keiluv/keiluvutils.cpp | 4 +- .../msbuildqbsgenerateproject.cpp | 5 +- .../visualstudio/msbuildqbsproductproject.cpp | 56 ++++++++++--------- ...msbuildsharedsolutionpropertiesproject.cpp | 19 ++++--- .../msbuildsolutionpropertiesproject.cpp | 24 +++++--- tests/benchmarker/valgrindrunner.cpp | 2 +- 18 files changed, 86 insertions(+), 66 deletions(-) diff --git a/cmake/QbsBuildConfig.cmake b/cmake/QbsBuildConfig.cmake index 3911809687..e4a63ae2ee 100644 --- a/cmake/QbsBuildConfig.cmake +++ b/cmake/QbsBuildConfig.cmake @@ -87,6 +87,7 @@ set(DEFAULT_DEFINES QT_WARN_DEPRECATED_BEFORE=0x060700 QT_WARN_DEPRECATED_UP_TO=0x060700 QT_NO_JAVA_STYLE_ITERATORS + QT_USE_QSTRINGBUILDER ) if(WIN32) list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _SCL_SECURE_NO_WARNINGS) @@ -244,8 +245,10 @@ function(add_qbs_test test_name) "QBS_TEST_SUITE_NAME=\"${suite_name}\"" "SRCDIR=\"${CMAKE_CURRENT_SOURCE_DIR}\"" ) + set(TEST_DEFINES ${DEFAULT_DEFINES}) + list(REMOVE_ITEM TEST_DEFINES QT_USE_QSTRINGBUILDER) target_compile_definitions( - ${target_name} PRIVATE ${_arg_DEFINES} ${DEFAULT_DEFINES} PUBLIC ${_arg_PUBLIC_DEFINES}) + ${target_name} PRIVATE ${_arg_DEFINES} ${TEST_DEFINES} PUBLIC ${_arg_PUBLIC_DEFINES}) target_include_directories( ${target_name} PRIVATE ${_arg_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}/../../../src" diff --git a/qbs-resources/imports/QbsProduct.qbs b/qbs-resources/imports/QbsProduct.qbs index cc88273324..c8996d5bb5 100644 --- a/qbs-resources/imports/QbsProduct.qbs +++ b/qbs-resources/imports/QbsProduct.qbs @@ -12,6 +12,7 @@ Product { "QT_NO_CAST_FROM_BYTEARRAY", "QT_NO_JAVA_STYLE_ITERATORS", "QT_NO_PROCESS_COMBINED_ARGUMENT_START", + "QT_USE_QSTRINGBUILDER", "QT_DISABLE_DEPRECATED_BEFORE=0x050f00", "QT_DISABLE_DEPRECATED_UP_TO=0x050f00", "QT_WARN_DEPRECATED_BEFORE=0x060700", diff --git a/src/app/qbs-setup-toolchains/clangclprobe.cpp b/src/app/qbs-setup-toolchains/clangclprobe.cpp index 272f953fcc..8020a04047 100644 --- a/src/app/qbs-setup-toolchains/clangclprobe.cpp +++ b/src/app/qbs-setup-toolchains/clangclprobe.cpp @@ -130,8 +130,7 @@ void clangClProbe(Settings *settings, std::vector &profiles) const QString suffix = index == 0 ? QString() : QStringLiteral("-%1").arg(index); qbs::Internal::transform( architectures, profiles, [settings, clangCl, suffix](const auto &arch) { - const auto profileName = QStringLiteral("clang-cl") + suffix - + QStringLiteral("-%1").arg(arch); + const auto profileName = QStringLiteral("clang-cl%1-%2").arg(suffix, arch); return createProfileHelper( settings, profileName, diff --git a/src/lib/corelib/generators/generator.cpp b/src/lib/corelib/generators/generator.cpp index 5e0f8e7d51..02f95526d9 100644 --- a/src/lib/corelib/generators/generator.cpp +++ b/src/lib/corelib/generators/generator.cpp @@ -213,9 +213,10 @@ const GeneratableProject ProjectGenerator::project() const QFileInfo ProjectGenerator::qbsExecutableFilePath() const { const QString qbsInstallDir = QString::fromLocal8Bit(qgetenv("QBS_INSTALL_DIR")); - auto file = QFileInfo(Internal::HostOsInfo::appendExecutableSuffix(!qbsInstallDir.isEmpty() - ? qbsInstallDir + QLatin1String("/bin/qbs") - : QCoreApplication::applicationDirPath() + QLatin1String("/qbs"))); + auto file = QFileInfo(Internal::HostOsInfo::appendExecutableSuffix( + !qbsInstallDir.isEmpty() + ? QString(qbsInstallDir + QStringLiteral("/bin/qbs")) + : QString(QCoreApplication::applicationDirPath() + QStringLiteral("/qbs")))); QBS_CHECK(file.isAbsolute() && file.exists()); return file; } diff --git a/src/lib/corelib/loader/moduleproviderloader.cpp b/src/lib/corelib/loader/moduleproviderloader.cpp index 0f7e42d7cd..6d7c7bbeb4 100644 --- a/src/lib/corelib/loader/moduleproviderloader.cpp +++ b/src/lib/corelib/loader/moduleproviderloader.cpp @@ -399,7 +399,7 @@ ModuleProviderLoader::EvaluationResult ModuleProviderLoader::evaluateModuleProvi auto searchPaths = m_loaderState.evaluator().stringListValue( providerItem, QStringLiteral("relativeSearchPaths")); auto prependBaseDir = [&outputBaseDir](const auto &path) { - return outputBaseDir + QLatin1Char('/') + path; + return QString(outputBaseDir + QLatin1Char('/') + path); }; std::transform(searchPaths.begin(), searchPaths.end(), searchPaths.begin(), prependBaseDir); return {searchPaths, isEager}; diff --git a/src/lib/corelib/loader/productscollector.cpp b/src/lib/corelib/loader/productscollector.cpp index 2e657e7ae9..024f92869d 100644 --- a/src/lib/corelib/loader/productscollector.cpp +++ b/src/lib/corelib/loader/productscollector.cpp @@ -373,9 +373,10 @@ void ProductsCollector::Private::prepareProduct(ProjectContext &projectContext, // and nothing else, thus providing us with the pure environment that we need to // evaluate the product's exported properties in isolation in the project resolver. Item * const importer = Item::create(&loaderState.itemPool(), ItemType::Product); - importer->setProperty(QStringLiteral("name"), - VariantValue::create(StringConstants::shadowProductPrefix() - + productContext.name)); + importer->setProperty( + QStringLiteral("name"), + VariantValue::create( + QString(StringConstants::shadowProductPrefix() + productContext.name))); importer->setFile(productItem->file()); importer->setLocation(productItem->location()); importer->setScope(projectContext.scope); diff --git a/src/lib/corelib/tools/msvcinfo.cpp b/src/lib/corelib/tools/msvcinfo.cpp index 77b83023af..412af8c2da 100644 --- a/src/lib/corelib/tools/msvcinfo.cpp +++ b/src/lib/corelib/tools/msvcinfo.cpp @@ -698,7 +698,9 @@ void MSVC::determineCompilerVersion() std::lock_guard locker(envMutex); const QByteArray origPath = qgetenv("PATH"); - qputenv("PATH", environment.value(StringConstants::pathEnvVar()).toLatin1() + ';' + origPath); + QByteArray tempPath = environment.value(StringConstants::pathEnvVar()).toLatin1() + ';' + + origPath; + qputenv("PATH", tempPath); QByteArray versionStr = runProcess( binPath + clExeSuffix(), QStringList() << QStringLiteral("/nologo") << QStringLiteral("/EP") diff --git a/src/plugins/generator/iarew/archs/arm/armlinkersettingsgroup_v8.cpp b/src/plugins/generator/iarew/archs/arm/armlinkersettingsgroup_v8.cpp index 2cabac587d..d2dcb0fe25 100644 --- a/src/plugins/generator/iarew/archs/arm/armlinkersettingsgroup_v8.cpp +++ b/src/plugins/generator/iarew/archs/arm/armlinkersettingsgroup_v8.cpp @@ -349,8 +349,7 @@ void ArmLinkerSettingsGroup::buildConfigPage( // Add remainder configuration files to the "Extra options page". if (!opts.configFilePaths.isEmpty()) { for (QVariant &configPath : opts.configFilePaths) - configPath = QLatin1String("--config ") - + configPath.toString(); + configPath = QString(QStringLiteral("--config ") + configPath.toString()); m_extraOptions << opts.configFilePaths; } @@ -389,7 +388,7 @@ void ArmLinkerSettingsGroup::buildLibraryPage( // "Extra options page", because IAR IDE // has not other options to add this paths. for (QVariant &libraryPath : opts.librarySearchPaths) - libraryPath = QLatin1String("-L ") + libraryPath.toString(); + libraryPath = QString(QStringLiteral("-L ") + libraryPath.toString()); m_extraOptions << opts.librarySearchPaths; } diff --git a/src/plugins/generator/iarew/archs/avr/avrlinkersettingsgroup_v7.cpp b/src/plugins/generator/iarew/archs/avr/avrlinkersettingsgroup_v7.cpp index 0af4f088bd..4d04cdee41 100644 --- a/src/plugins/generator/iarew/archs/avr/avrlinkersettingsgroup_v7.cpp +++ b/src/plugins/generator/iarew/archs/avr/avrlinkersettingsgroup_v7.cpp @@ -301,7 +301,7 @@ void AvrLinkerSettingsGroup::buildConfigPage( // Add remainder configuration files to the "Extra options page". if (!opts.configFilePaths.isEmpty()) { for (QVariant &configPath : opts.configFilePaths) - configPath = QLatin1String("-f ") + configPath.toString(); + configPath = QString(QStringLiteral("-f ") + configPath.toString()); m_extraOptions << opts.configFilePaths; } diff --git a/src/plugins/generator/iarew/archs/mcs51/mcs51linkersettingsgroup_v10.cpp b/src/plugins/generator/iarew/archs/mcs51/mcs51linkersettingsgroup_v10.cpp index d2c7f38461..2e597e69e1 100644 --- a/src/plugins/generator/iarew/archs/mcs51/mcs51linkersettingsgroup_v10.cpp +++ b/src/plugins/generator/iarew/archs/mcs51/mcs51linkersettingsgroup_v10.cpp @@ -248,7 +248,7 @@ void Mcs51LinkerSettingsGroup::buildConfigPage( // Add remainder configuration files to the "Extra options page". if (!opts.configFilePaths.isEmpty()) { for (QVariant &configPath : opts.configFilePaths) - configPath = QLatin1String("-f ") + configPath.toString(); + configPath = QString(QStringLiteral("-f ") + configPath.toString()); m_extraOptions << opts.configFilePaths; } diff --git a/src/plugins/generator/iarew/archs/msp430/msp430linkersettingsgroup_v7.cpp b/src/plugins/generator/iarew/archs/msp430/msp430linkersettingsgroup_v7.cpp index 85aac7e833..7a07068175 100644 --- a/src/plugins/generator/iarew/archs/msp430/msp430linkersettingsgroup_v7.cpp +++ b/src/plugins/generator/iarew/archs/msp430/msp430linkersettingsgroup_v7.cpp @@ -217,7 +217,7 @@ void Msp430LinkerSettingsGroup::buildConfigPage( // Add remainder configuration files to the "Extra options page". if (!opts.configFilePaths.isEmpty()) { for (QVariant &configPath : opts.configFilePaths) - configPath = QLatin1String("-f ") + configPath.toString(); + configPath = QString(QStringLiteral("-f ") + configPath.toString()); m_extraOptions << opts.configFilePaths; } diff --git a/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp b/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp index 4413339768..a52e9e4dfa 100644 --- a/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp +++ b/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp @@ -294,7 +294,7 @@ void Stm8LinkerSettingsGroup::buildConfigPage( // Add remainder configuration files to the "Extra options page". if (!opts.configFilePaths.isEmpty()) { for (QVariant &configPath : opts.configFilePaths) - configPath = QLatin1String("--config ") + configPath.toString(); + configPath = QString(QStringLiteral("--config ") + configPath.toString()); m_extraOptions << opts.configFilePaths; } diff --git a/src/plugins/generator/keiluv/keiluvutils.cpp b/src/plugins/generator/keiluv/keiluvutils.cpp index 628a8e98a8..ec5461d3b7 100644 --- a/src/plugins/generator/keiluv/keiluvutils.cpp +++ b/src/plugins/generator/keiluv/keiluvutils.cpp @@ -108,8 +108,8 @@ QStringList staticLibraries(const PropertyMap &qbsProps) QStringList dependencies(const std::vector &qbsProductDeps) { return Internal::transformed(qbsProductDeps, [](const auto &dep) { - const auto path = dep.buildDirectory() + QLatin1String("/obj/") - + gen::utils::targetBinary(dep); + const QString path = dep.buildDirectory() + QStringLiteral("/obj/") + + gen::utils::targetBinary(dep); return QDir::toNativeSeparators(path); }); } diff --git a/src/plugins/generator/visualstudio/msbuildqbsgenerateproject.cpp b/src/plugins/generator/visualstudio/msbuildqbsgenerateproject.cpp index 24fc991ae0..3a92e168fd 100644 --- a/src/plugins/generator/visualstudio/msbuildqbsgenerateproject.cpp +++ b/src/plugins/generator/visualstudio/msbuildqbsgenerateproject.cpp @@ -57,8 +57,9 @@ MSBuildQbsGenerateProject::MSBuildQbsGenerateProject( QStringLiteral("Makefile")); const auto params = Internal::shellQuote(project.commandLine(), Internal::HostOsInfo::HostOsWindows); - group->appendProperty(QStringLiteral("NMakeBuildCommandLine"), - QStringLiteral("$(QbsGenerateCommandLine) ") + params); + group->appendProperty( + QStringLiteral("NMakeBuildCommandLine"), + QString(QStringLiteral("$(QbsGenerateCommandLine) ") + params)); const auto cppProps = new MSBuildImport(this); cppProps->setProject(QStringLiteral("$(VCTargetsPath)\\Microsoft.Cpp.props")); diff --git a/src/plugins/generator/visualstudio/msbuildqbsproductproject.cpp b/src/plugins/generator/visualstudio/msbuildqbsproductproject.cpp index cccaf758c5..b089bf0496 100644 --- a/src/plugins/generator/visualstudio/msbuildqbsproductproject.cpp +++ b/src/plugins/generator/visualstudio/msbuildqbsproductproject.cpp @@ -151,10 +151,11 @@ void MSBuildQbsProductProject::addConfiguration(const GeneratableProject &projec // General - General // We need a trailing backslash for $(OutDir); See also the VS documentation: // https://docs.microsoft.com/en-us/cpp/ide/common-macros-for-build-commands-and-properties - propertyGroup1->appendProperty(QStringLiteral("OutDir"), relativeTargetDir + QLatin1Char('\\')); + propertyGroup1->appendProperty( + QStringLiteral("OutDir"), QString(relativeTargetDir + QLatin1Char('\\'))); propertyGroup1->appendProperty(QStringLiteral("TargetName"), productData.targetName()); - propertyGroup1->appendProperty(QStringLiteral("PlatformToolset"), - versionInfo().platformToolsetVersion()); + propertyGroup1->appendProperty( + QStringLiteral("PlatformToolset"), versionInfo().platformToolsetVersion()); propertyGroup1->appendProperty(QStringLiteral("ConfigurationType"), QStringLiteral("Makefile")); // VS possible values: Unicode|MultiByte|NotSet @@ -219,16 +220,19 @@ void MSBuildQbsProductProject::addConfiguration(const GeneratableProject &projec // NMake - General // Skip configuration name, that's handled in qbs-shared.props - const auto params = Internal::shellQuote(buildConfigurationCommandLine.mid(1), - Internal::HostOsInfo::HostOsWindows); - propertyGroup1->appendProperty(QStringLiteral("NMakeBuildCommandLine"), - QStringLiteral("$(QbsBuildCommandLine) ") + params); - propertyGroup1->appendProperty(QStringLiteral("NMakeReBuildCommandLine"), - QStringLiteral("$(QbsReBuildCommandLine) ") + params); - propertyGroup1->appendProperty(QStringLiteral("NMakeCleanCommandLine"), - QStringLiteral("$(QbsCleanCommandLine) ") + params); - propertyGroup1->appendProperty(QStringLiteral("NMakeOutput"), - QStringLiteral("$(OutDir)$(TargetName)$(TargetExt)")); + const auto params = Internal::shellQuote( + buildConfigurationCommandLine.mid(1), Internal::HostOsInfo::HostOsWindows); + propertyGroup1->appendProperty( + QStringLiteral("NMakeBuildCommandLine"), + QString(QStringLiteral("$(QbsBuildCommandLine) ") + params)); + propertyGroup1->appendProperty( + QStringLiteral("NMakeReBuildCommandLine"), + QString(QStringLiteral("$(QbsReBuildCommandLine) ") + params)); + propertyGroup1->appendProperty( + QStringLiteral("NMakeCleanCommandLine"), + QString(QStringLiteral("$(QbsCleanCommandLine) ") + params)); + propertyGroup1->appendProperty( + QStringLiteral("NMakeOutput"), QStringLiteral("$(OutDir)$(TargetName)$(TargetExt)")); // NMake - IntelliSense propertyGroup1->appendProperty(QStringLiteral("NMakePreprocessorDefinitions"), @@ -278,10 +282,9 @@ void MSBuildQbsProductProject::addItemDefGroup(const Project &project, const auto compile = new MSBuildClCompile(itemDefGroup); // C++ - General - compile->appendProperty(QStringLiteral("AdditionalIncludeDirectories"), - includePaths.join(sep) - + sep - + QStringLiteral("%(AdditionalIncludeDirectories)")); + compile->appendProperty( + QStringLiteral("AdditionalIncludeDirectories"), + QString(includePaths.join(sep) + sep + QStringLiteral("%(AdditionalIncludeDirectories)"))); if (warningLevel == QStringLiteral("none")) compile->appendProperty(QStringLiteral("WarningLevel"), QStringLiteral("TurnOffAllWarnings")); @@ -299,10 +302,9 @@ void MSBuildQbsProductProject::addItemDefGroup(const Project &project, : QStringLiteral("MaxSpeed")); // C++ - Preprocessor - compile->appendProperty(QStringLiteral("PreprocessorDefinitions"), - cppDefines.join(sep) - + sep - + QStringLiteral("%(PreprocessorDefinitions)")); + compile->appendProperty( + QStringLiteral("PreprocessorDefinitions"), + QString(cppDefines.join(sep) + sep + QStringLiteral("%(PreprocessorDefinitions)"))); // C++ - Code Generation compile->appendProperty(QStringLiteral("RuntimeLibrary"), debugBuild @@ -317,10 +319,14 @@ void MSBuildQbsProductProject::addItemDefGroup(const Project &project, QStringLiteral("libraryPaths")).join(sep)); // Linker - Input - link->appendProperty(QStringLiteral("AdditionalDependencies"), - properties.getModulePropertiesAsStringList(QStringLiteral("cpp"), - QStringLiteral("staticLibraries")).join(sep) - + sep + QStringLiteral("%(AdditionalDependencies)")); + link->appendProperty( + QStringLiteral("AdditionalDependencies"), + QString( + properties + .getModulePropertiesAsStringList( + QStringLiteral("cpp"), QStringLiteral("staticLibraries")) + .join(sep) + + sep + QStringLiteral("%(AdditionalDependencies)"))); // Linker - Debugging link->appendProperty(QStringLiteral("GenerateDebugInformation"), diff --git a/src/plugins/generator/visualstudio/msbuildsharedsolutionpropertiesproject.cpp b/src/plugins/generator/visualstudio/msbuildsharedsolutionpropertiesproject.cpp index 878ebbcd27..228ba19839 100644 --- a/src/plugins/generator/visualstudio/msbuildsharedsolutionpropertiesproject.cpp +++ b/src/plugins/generator/visualstudio/msbuildsharedsolutionpropertiesproject.cpp @@ -112,18 +112,19 @@ MSBuildSharedSolutionPropertiesProject::MSBuildSharedSolutionPropertiesProject( group->setLabel(QStringLiteral("UserMacros")); // Order's important here... a variable must be listed before one that uses it - group->appendProperty(QStringLiteral("QbsExecutablePath"), - QStringLiteral("$(QbsExecutableDir)") + qbsExecutable.fileName()); + group->appendProperty( + QStringLiteral("QbsExecutablePath"), + QString(QStringLiteral("$(QbsExecutableDir)") + qbsExecutable.fileName())); if (!project.installOptions.installRoot().isEmpty()) { - group->appendProperty(QStringLiteral("QbsInstallRoot"), - Internal::PathUtils::toNativeSeparators( - project.installOptions.installRoot(), - Internal::HostOsInfo::HostOsWindows)); + group->appendProperty( + QStringLiteral("QbsInstallRoot"), + Internal::PathUtils::toNativeSeparators( + project.installOptions.installRoot(), Internal::HostOsInfo::HostOsWindows)); } - group->appendProperty(QStringLiteral("QbsProjectFile"), - QStringLiteral("$(QbsProjectDir)") - + project.filePath().fileName()); + group->appendProperty( + QStringLiteral("QbsProjectFile"), + QString(QStringLiteral("$(QbsProjectDir)") + project.filePath().fileName())); // Trailing '.' is not a typo. It prevents the trailing slash from combining with the closing // quote to form an escape sequence. Unfortunately, Visual Studio expands variables *before* diff --git a/src/plugins/generator/visualstudio/msbuildsolutionpropertiesproject.cpp b/src/plugins/generator/visualstudio/msbuildsolutionpropertiesproject.cpp index ea5546c738..dd63571a93 100644 --- a/src/plugins/generator/visualstudio/msbuildsolutionpropertiesproject.cpp +++ b/src/plugins/generator/visualstudio/msbuildsolutionpropertiesproject.cpp @@ -52,17 +52,23 @@ MSBuildSolutionPropertiesProject::MSBuildSolutionPropertiesProject( static const auto win = Internal::HostOsInfo::HostOsWindows; - group->appendProperty(QStringLiteral("QbsExecutableDir"), - Internal::PathUtils::toNativeSeparators(qbsExecutable.path(), win) - + Internal::HostOsInfo::pathSeparator(win)); - group->appendProperty(QStringLiteral("QbsProjectDir"), - Internal::PathUtils::toNativeSeparators(project.filePath().path(), win) - + Internal::HostOsInfo::pathSeparator(win)); + group->appendProperty( + QStringLiteral("QbsExecutableDir"), + QString( + Internal::PathUtils::toNativeSeparators(qbsExecutable.path(), win) + + Internal::HostOsInfo::pathSeparator(win))); + group->appendProperty( + QStringLiteral("QbsProjectDir"), + QString( + Internal::PathUtils::toNativeSeparators(project.filePath().path(), win) + + Internal::HostOsInfo::pathSeparator(win))); if (!qbsSettingsDir.isEmpty()) { - group->appendProperty(QStringLiteral("QbsSettingsDir"), - Internal::PathUtils::toNativeSeparators(qbsSettingsDir, win) - + Internal::HostOsInfo::pathSeparator(win) + QLatin1Char('.')); + group->appendProperty( + QStringLiteral("QbsSettingsDir"), + QString( + Internal::PathUtils::toNativeSeparators(qbsSettingsDir, win) + + Internal::HostOsInfo::pathSeparator(win) + QLatin1Char('.'))); } } diff --git a/tests/benchmarker/valgrindrunner.cpp b/tests/benchmarker/valgrindrunner.cpp index 7509dbb521..c4b04d1dd4 100644 --- a/tests/benchmarker/valgrindrunner.cpp +++ b/tests/benchmarker/valgrindrunner.cpp @@ -225,7 +225,7 @@ qint64 ValgrindRunner::runMassif(const QString &qbsCommand, const QString &build throw Exception(exceptionStringPattern.arg("No peak marker found")); while (!buffer.atEnd()) { const QByteArray line = buffer.readLine().simplified(); - if (!line.startsWith(peakSnapshot + ' ')) + if (!line.startsWith(QByteArray(peakSnapshot + ' '))) continue; const QList entries = line.split(' '); if (entries.size() != 6) {