diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-10-02 08:49:24 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-10-05 14:33:19 +0300 |
commit | 40d75ecfbe45d945d1ac9dedc99edad4538b5da4 (patch) | |
tree | bb2600ae715e0efeab8e37ccd1ba77b782669c2c /src/sdk | |
parent | 4bf453fb84c67283c85180dcf964526534f0ef72 (diff) |
CLI: Add short versions for message query options
Task-id: QTIFW-1982
Change-Id: I97f51c0931f4baef5e19f0e819bd6beee186301e
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r-- | src/sdk/main.cpp | 6 | ||||
-rw-r--r-- | src/sdk/sdkapp.h | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp index 9b425bc98..cc6e247e0 100644 --- a/src/sdk/main.cpp +++ b/src/sdk/main.cpp @@ -98,9 +98,9 @@ int main(int argc, char *argv[]) } if (mutually.isEmpty()) { mutually = QInstaller::checkMutualOptions(parser, QStringList() - << CommandLineOptions::scAcceptMessageQuery - << CommandLineOptions::scRejectMessageQuery - << CommandLineOptions::scMessageDefaultAnswer); + << CommandLineOptions::scAcceptMessageQueryLong + << CommandLineOptions::scRejectMessageQueryLong + << CommandLineOptions::scMessageDefaultAnswerLong); } if (mutually.isEmpty()) { mutually = QInstaller::checkMutualOptions(parser, QStringList() diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index 83a76fcbb..2a2a36f2d 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -297,24 +297,25 @@ public: // Ignore message acceptance options when running the installer with GUI if (m_core->isCommandLineInstance()) { - if (m_parser.isSet(CommandLineOptions::scAcceptMessageQuery)) + if (m_parser.isSet(CommandLineOptions::scAcceptMessageQueryLong)) m_core->autoAcceptMessageBoxes(); - if (m_parser.isSet(CommandLineOptions::scRejectMessageQuery)) + if (m_parser.isSet(CommandLineOptions::scRejectMessageQueryLong)) m_core->autoRejectMessageBoxes(); - if (m_parser.isSet(CommandLineOptions::scMessageDefaultAnswer)) + if (m_parser.isSet(CommandLineOptions::scMessageDefaultAnswerLong)) m_core->acceptMessageBoxDefaultButton(); - if (m_parser.isSet(CommandLineOptions::scMessageAutomaticAnswer)) { - const QString positionalArguments = m_parser.value(CommandLineOptions::scMessageAutomaticAnswer); + if (m_parser.isSet(CommandLineOptions::scMessageAutomaticAnswerLong)) { + const QString positionalArguments = m_parser.value(CommandLineOptions::scMessageAutomaticAnswerLong); const QStringList items = positionalArguments.split(QLatin1Char(','), QString::SkipEmptyParts); if (items.count() > 0) { errorMessage = setMessageBoxAutomaticAnswers(items); if (!errorMessage.isEmpty()) return false; } else { - errorMessage = QObject::tr("Arguments missing for option %1").arg(CommandLineOptions::scMessageAutomaticAnswer); + errorMessage = QObject::tr("Arguments missing for option %1") + .arg(CommandLineOptions::scMessageAutomaticAnswerLong); return false; } } @@ -465,7 +466,8 @@ public: return QObject::tr("Invalid button value %1 ").arg(value); } } else { - return QObject::tr("Incorrect arguments for %1").arg(CommandLineOptions::scMessageAutomaticAnswer); + return QObject::tr("Incorrect arguments for %1") + .arg(CommandLineOptions::scMessageAutomaticAnswerLong); } } return QString(); |