diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-04-29 11:20:07 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-04-30 10:30:43 +0300 |
commit | 7c4403a17e3ee4d84444b1d8c7edb3ac84c9ae80 (patch) | |
tree | a3042481fac61059822d7eb99ada68537971688e | |
parent | 1fc539a0d29a83392949d2e343a209ceb1d8dc2e (diff) |
Rationalize auto-answer format
Makes no sense to force users to type the 'QMessageBox::' in front of
value, we an always prepend that in code.
Change-Id: I3f9152c53875f06c70eb1601ecbe286d3849febd
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r-- | src/libs/installer/commandlineparser.cpp | 2 | ||||
-rw-r--r-- | src/sdk/sdkapp.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/installer/commandlineparser.cpp b/src/libs/installer/commandlineparser.cpp index 6191c302d..d1e3e89d6 100644 --- a/src/libs/installer/commandlineparser.cpp +++ b/src/libs/installer/commandlineparser.cpp @@ -154,7 +154,7 @@ CommandLineParser::CommandLineParser() m_parser.addOption(QCommandLineOption(QStringList() << CommandLineOptions::scMessageAutomaticAnswer, QLatin1String("Automatically answers the message queries with the message identifier and button value. " "Several identifier=value pairs can be given separated with comma, " - "for example --auto-answer message.id=QMessageBox::Ok,message.id2=QMessageBox::Cancel."), + "for example --auto-answer message.id=Ok,message.id2=Cancel."), QLatin1String("identifier=value"))); m_parser.addOption(QCommandLineOption(QStringList() << CommandLineOptions::scMessageDefaultAnswer, QLatin1String("Automatically answers to message queries with their default values."))); diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index 90a4b7334..5e5e526b4 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -411,7 +411,8 @@ public: if (enumIndex != -1) { QMetaEnum en = metaObject.enumerator(enumIndex); const QString name = item.section(QLatin1Char('='), 0, 0); - const QString value = item.section(QLatin1Char('='), 1, 1); + QString value = item.section(QLatin1Char('='), 1, 1); + value.prepend(QLatin1String("QMessageBox::")); bool ok = false; int buttonValue = en.keyToValue(value.toLocal8Bit().data(), &ok); if (ok) |