aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-07-10 12:25:57 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-07-10 17:14:22 +0200
commitfa33766b45b4b6b4db3b07b710475d362f342d19 (patch)
treef4711dc9fb7ea29a6fa2c3607161921ce0446861 /src/app
parentc78799a861c0e6ac171d60cec71c6f03a9eed19a (diff)
qbs-config: Get rid of the "CfgGet" command type.
This one is silly. It has the same functionality as "CfgList", but takes a different code path and can format values differently. Change-Id: If77023bc9960ea545e3cfdc11b763e0f32a98409 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/configcommand.h2
-rw-r--r--src/app/config/configcommandexecutor.cpp3
-rw-r--r--src/app/config/configcommandlineparser.cpp2
3 files changed, 2 insertions, 5 deletions
diff --git a/src/app/config/configcommand.h b/src/app/config/configcommand.h
index a2c428372..3b87874e3 100644
--- a/src/app/config/configcommand.h
+++ b/src/app/config/configcommand.h
@@ -37,7 +37,7 @@
class ConfigCommand
{
public:
- enum Command { CfgSet, CfgGet, CfgUnset, CfgList, CfgExport, CfgImport, CfgNone };
+ enum Command { CfgSet, CfgUnset, CfgList, CfgExport, CfgImport, CfgNone };
ConfigCommand() : command(CfgNone) {}
diff --git a/src/app/config/configcommandexecutor.cpp b/src/app/config/configcommandexecutor.cpp
index cabfece04..b3e9ea369 100644
--- a/src/app/config/configcommandexecutor.cpp
+++ b/src/app/config/configcommandexecutor.cpp
@@ -52,9 +52,6 @@ void ConfigCommandExecutor::execute(const ConfigCommand &command)
case ConfigCommand::CfgList:
printSettings(command);
break;
- case ConfigCommand::CfgGet:
- puts(qPrintable(m_settings->value(command.varNames.first()).toString()));
- break;
case ConfigCommand::CfgSet:
setValue(command.varNames.first(), command.varValue);
break;
diff --git a/src/app/config/configcommandlineparser.cpp b/src/app/config/configcommandlineparser.cpp
index 076fb1c90..2544c356e 100644
--- a/src/app/config/configcommandlineparser.cpp
+++ b/src/app/config/configcommandlineparser.cpp
@@ -75,7 +75,7 @@ void ConfigCommandLineParser::parse(const QStringList &commandLine)
throw ErrorInfo(Tr::tr("Too many arguments."));
m_command.varNames << m_commandLine.first();
if (m_commandLine.count() == 1) {
- setCommand(ConfigCommand::CfgGet);
+ setCommand(ConfigCommand::CfgList);
} else {
m_command.varValue = m_commandLine.at(1);
setCommand(ConfigCommand::CfgSet);