diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-01-05 16:47:12 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-01-05 16:47:12 +0100 |
commit | 0dcf694c8776ac03779e465bdc4859fba9be314d (patch) | |
tree | 25c742f97a98fb7534f8a2180f5b7b165bf7e8c5 /depends/util | |
parent | a64eebf8eb758971b090b2e87212c2458424797e (diff) | |
download | MultiMC-0dcf694c8776ac03779e465bdc4859fba9be314d.tar MultiMC-0dcf694c8776ac03779e465bdc4859fba9be314d.tar.gz MultiMC-0dcf694c8776ac03779e465bdc4859fba9be314d.tar.lz MultiMC-0dcf694c8776ac03779e465bdc4859fba9be314d.tar.xz MultiMC-0dcf694c8776ac03779e465bdc4859fba9be314d.zip |
More updater fixage
Preserve --dir parameter after updating
Allow more than one copy of a command line parameter in MultiMC
Linux runner script no longer changes current directory, which allows '--dir .'
Fixed unit tests, removed the obsolete one (for some legacy updater command line params that were also removed)
[fixes 63127704]
Diffstat (limited to 'depends/util')
-rw-r--r-- | depends/util/src/cmdutils.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/depends/util/src/cmdutils.cpp b/depends/util/src/cmdutils.cpp index 43a0bcde..b12098dc 100644 --- a/depends/util/src/cmdutils.cpp +++ b/depends/util/src/cmdutils.cpp @@ -286,11 +286,11 @@ QHash<QString, QVariant> Parser::parse(QStringList argv) // we were expecting an argument { QString name = expecting.first(); - +/* if (map.contains(name)) throw ParsingError( QString("Option %2%1 was given multiple times").arg(name, optionPrefix)); - +*/ map[name] = QVariant(arg); expecting.removeFirst(); @@ -316,10 +316,11 @@ QHash<QString, QVariant> Parser::parse(QStringList argv) if (m_options.contains(name)) { + /* if (map.contains(name)) throw ParsingError(QString("Option %2%1 was given multiple times") .arg(name, optionPrefix)); - +*/ OptionDef *option = m_options[name]; if (option->type == otSwitch) map[name] = true; @@ -367,11 +368,11 @@ QHash<QString, QVariant> Parser::parse(QStringList argv) throw ParsingError(QString("Unknown flag %2%1").arg(flag, flagPrefix)); OptionDef *option = m_flags[flag]; - +/* if (map.contains(option->name)) throw ParsingError(QString("Option %2%1 was given multiple times") .arg(option->name, optionPrefix)); - +*/ if (option->type == otSwitch) map[option->name] = true; else // if (option->type == otOption) |