aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/shared
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2012-11-15 09:01:24 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2012-11-15 09:48:47 +0100
commit6f706911ed74859fd8498d3f80e6ff7f5f520650 (patch)
tree55be276d9d59f3b5a3a4d0ea0f864a4e1cae33d4 /src/app/shared
parentc2f82cc551388af51029a7b4c1e8187b908e1c5a (diff)
Always initialize Buildoptions::maxJobCount to a sensible value.
We currently do the initialization in the command line parser, where it is of no use to other clients of the library. Change-Id: I8dc04840c4d716f5d488e1511130c03f2377ad14 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/app/shared')
-rw-r--r--src/app/shared/commandlineparser.cpp9
-rw-r--r--src/app/shared/commandlineparser.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/src/app/shared/commandlineparser.cpp b/src/app/shared/commandlineparser.cpp
index 6532755c6..5ea8686a9 100644
--- a/src/app/shared/commandlineparser.cpp
+++ b/src/app/shared/commandlineparser.cpp
@@ -32,13 +32,13 @@
#include <logging/logger.h>
#include <tools/error.h>
#include <tools/fileinfo.h>
-#include <tools/platform.h>
#include <tools/hostosinfo.h>
+#include <tools/platform.h>
+#include <tools/settings.h>
#include <QCoreApplication>
#include <QDir>
#include <QTextStream>
-#include <QThread>
#ifdef Q_OS_UNIX
#include <unistd.h>
@@ -151,9 +151,6 @@ void CommandLineParser::doParse()
m_projectFileName.clear();
m_products.clear();
m_buildOptions = BuildOptions();
- m_buildOptions.maxJobCount = m_settings.value("preferences/jobs", 0).toInt();
- if (m_buildOptions.maxJobCount <= 0)
- m_buildOptions.maxJobCount = QThread::idealThreadCount();
m_help = false;
m_showProgress = false;
m_logLevel = Logger::defaultLevel();
@@ -396,7 +393,7 @@ QList<QVariantMap> CommandLineParser::buildConfigurations() const
properties.insert(currentKey, currentProperties);
if (properties.count() == 1) // No build variant specified on command line.
- properties.insert(m_settings.buildVariant(), QVariantMap());
+ properties.insert(Settings().buildVariant(), QVariantMap());
const PropertyMaps::Iterator globalMapIt = properties.find(QString());
Q_ASSERT(globalMapIt != properties.end());
diff --git a/src/app/shared/commandlineparser.h b/src/app/shared/commandlineparser.h
index a0de3d36d..5d9d11c16 100644
--- a/src/app/shared/commandlineparser.h
+++ b/src/app/shared/commandlineparser.h
@@ -31,7 +31,6 @@
#define OPTIONS_H
#include <tools/buildoptions.h>
-#include <tools/settings.h>
#include <QCoreApplication>
#include <QPair>
@@ -81,7 +80,6 @@ private:
QString propertyName(const QString &aCommandLineName) const;
void setRealProjectFile();
- Settings m_settings;
Command m_command;
QString m_runTargetName;
QString m_projectFileName;