aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/shared
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2012-11-05 13:48:32 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2012-11-06 17:40:01 +0100
commit36f4aa2dadf5964d222203ce02a973db47e6f096 (patch)
treec0cb3137fbf462ea4d2c8630ed30c8f44cb8dc67 /src/app/shared
parentdb1a70a524dfb44eca43bab76c83bf56195e2684 (diff)
Do product filtering at an earlier stage.
It is unintuitive and confusing to give the Sourceproject and the Executor a list of projects as part of their build() operations, when in reality just some products should be built. So take the "selectedProducts" out of the Buildoptions and do the filtering outside of the library. This way, we can tell the API "build these projects" or "build these products" and it will mean exactly that. Change-Id: I88860a9cf7f4058145964b1b56b01e7970c9e8d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/app/shared')
-rw-r--r--src/app/shared/commandlineparser.cpp3
-rw-r--r--src/app/shared/commandlineparser.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/app/shared/commandlineparser.cpp b/src/app/shared/commandlineparser.cpp
index 5ba9e1626..03e6c0dff 100644
--- a/src/app/shared/commandlineparser.cpp
+++ b/src/app/shared/commandlineparser.cpp
@@ -150,6 +150,7 @@ void CommandLineParser::doParse()
{
m_command = BuildCommand;
m_projectFileName.clear();
+ m_products.clear();
m_buildOptions = BuildOptions();
m_buildOptions.maxJobCount = m_settings->value("preferences/jobs", 0).toInt();
if (m_buildOptions.maxJobCount <= 0)
@@ -227,7 +228,7 @@ void CommandLineParser::parseLongOption(const QString &option)
}
} else if (optionName == QLatin1String("products") && (m_command == BuildCommand
|| m_command == CleanCommand || m_command == PropertiesCommand)) {
- m_buildOptions.selectedProductNames = getOptionArgumentAsList(option);
+ m_products = getOptionArgumentAsList(option);
#ifdef Q_OS_UNIX
} else if (optionName == QLatin1String("show-progress")) {
if (isatty(STDOUT_FILENO))
diff --git a/src/app/shared/commandlineparser.h b/src/app/shared/commandlineparser.h
index 95cbc56d4..a0a8faef6 100644
--- a/src/app/shared/commandlineparser.h
+++ b/src/app/shared/commandlineparser.h
@@ -62,6 +62,7 @@ public:
const QString &runTargetName() const { return m_runTargetName; }
const QString &projectFileName() const { return m_projectFileName; }
const QStringList &runArgs() const { return m_runArgs; }
+ const QStringList &products() const { return m_products; }
bool isHelpSet() const { return m_help; }
QList<QVariantMap> buildConfigurations() const;
bool showProgress() const { return m_showProgress; }
@@ -86,6 +87,7 @@ private:
QStringList m_commandLine;
QStringList m_positional;
QStringList m_runArgs;
+ QStringList m_products;
BuildOptions m_buildOptions;
bool m_help;
int m_logLevel;