diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-10-25 09:40:55 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-11-16 19:06:27 +0000 |
commit | 6c712e48035b4871781a662b5ae235a2ba6f86bf (patch) | |
tree | 711a3b1b91a942c02c81fcca8da0b76e65195d03 /src/app/qbs | |
parent | 0a57af7fc7e95beb72d28d73962ebeae386da5bc (diff) |
STL compatibility: use push_back() instead of operator<<
...and operator+=
Change-Id: I848610544cacc2d187d601c0db567703c3e68c93
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app/qbs')
-rw-r--r-- | src/app/qbs/commandlinefrontend.cpp | 18 | ||||
-rw-r--r-- | src/app/qbs/parser/commandlineparser.cpp | 12 | ||||
-rw-r--r-- | src/app/qbs/parser/parsercommand.cpp | 2 |
3 files changed, 18 insertions, 14 deletions
diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp index 87e86f37a..d5a8bbd55 100644 --- a/src/app/qbs/commandlinefrontend.cpp +++ b/src/app/qbs/commandlinefrontend.cpp @@ -178,7 +178,7 @@ void CommandLineFrontend::start() SetupProjectJob * const job = Project().setupProject(params, ConsoleLogger::instance().logSink(), this); connectJob(job); - m_resolveJobs << job; + m_resolveJobs.push_back(job); } /* @@ -230,7 +230,7 @@ void CommandLineFrontend::handleJobFinished(bool success, AbstractJob *job) cancel(); } else if (SetupProjectJob * const setupJob = qobject_cast<SetupProjectJob *>(job)) { m_resolveJobs.removeOne(job); - m_projects << setupJob->project(); + m_projects.push_back(setupJob->project()); if (m_observer && resolvingMultipleProjects()) m_observer->incrementProgressValue(); if (m_resolveJobs.empty()) @@ -345,7 +345,7 @@ CommandLineFrontend::ProductMap CommandLineFrontend::productsToUse() const const ProjectData projectData = project.projectData(); foreach (const ProductData &product, projectData.allProducts()) { if (useAll || m_parser.products().contains(product.name())) { - productList << product; + productList.push_back(product); productNames << product.name(); } } @@ -416,9 +416,10 @@ void CommandLineFrontend::makeClean() } else { const ProductMap &products = productsToUse(); for (ProductMap::ConstIterator it = products.begin(); it != products.end(); ++it) { - m_buildJobs << it.key().cleanSomeProducts(it.value(), - m_parser.cleanOptions(it.key().profile()), - this); + m_buildJobs.push_back(it.key().cleanSomeProducts( + it.value(), + m_parser.cleanOptions(it.key().profile()), + this)); } } connectBuildJobs(); @@ -486,7 +487,8 @@ void CommandLineFrontend::build() } else { const ProductMap &products = productsToUse(); for (ProductMap::ConstIterator it = products.begin(); it != products.end(); ++it) - m_buildJobs << it.key().buildSomeProducts(it.value(), buildOptions(it.key()), this); + m_buildJobs.push_back(it.key().buildSomeProducts(it.value(), + buildOptions(it.key()), this)); } connectBuildJobs(); @@ -626,7 +628,7 @@ ProductData CommandLineFrontend::getTheOneRunnableProduct() QList<ProductData> runnableProducts; foreach (const ProductData &p, m_projects.front().projectData().allProducts()) { if (p.isRunnable()) - runnableProducts << p; + runnableProducts.push_back(p); } if (runnableProducts.size() == 1) diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp index 427cf313a..2df1d8cce 100644 --- a/src/app/qbs/parser/commandlineparser.cpp +++ b/src/app/qbs/parser/commandlineparser.cpp @@ -474,18 +474,20 @@ void CommandLineParser::CommandLineParserPrivate::setupBuildConfigurations() const QString key = arg.left(sepPos); const QString rawValue = arg.mid(sepPos + 1); if (key == QLatin1String("config") || key == configurationNameKey) { - propertiesPerConfiguration << std::make_pair(currentConfigurationName, - currentProperties); + propertiesPerConfiguration.push_back(std::make_pair(currentConfigurationName, + currentProperties)); currentConfigurationName = rawValue; currentProperties.clear(); continue; } currentProperties.insert(propertyName(key), representationToSettingsValue(rawValue)); } - propertiesPerConfiguration << std::make_pair(currentConfigurationName, currentProperties); + propertiesPerConfiguration.push_back(std::make_pair(currentConfigurationName, + currentProperties)); if (propertiesPerConfiguration.size() == 1) // No configuration name specified on command line. - propertiesPerConfiguration << PropertyListItem(QStringLiteral("default"), QVariantMap()); + propertiesPerConfiguration.push_back(PropertyListItem(QStringLiteral("default"), + QVariantMap())); const QVariantMap globalProperties = propertiesPerConfiguration.takeFirst().second; QList<QVariantMap> buildConfigs; @@ -505,7 +507,7 @@ void CommandLineParser::CommandLineParserPrivate::setupBuildConfigurations() } properties.insert(configurationNameKey, configurationName); - buildConfigs << properties; + buildConfigs.push_back(properties); } buildConfigurations = buildConfigs; diff --git a/src/app/qbs/parser/parsercommand.cpp b/src/app/qbs/parser/parsercommand.cpp index aa9cf0f6d..3fbb1d885 100644 --- a/src/app/qbs/parser/parsercommand.cpp +++ b/src/app/qbs/parser/parsercommand.cpp @@ -95,7 +95,7 @@ QList<CommandLineOption::Type> Command::actualSupportedOptions() const if (!HostOsInfo::isAnyUnixHost()) options.removeOne(CommandLineOption::ShowProgressOptionType); if (type() != HelpCommandType) - options << CommandLineOption::SettingsDirOptionType; // Valid for almost all commands. + options.push_back(CommandLineOption::SettingsDirOptionType); // Valid for almost all commands. return options; } |