From 7fb982e711f8b12afa585d19851b1bb0b7b081a4 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Tue, 12 Feb 2013 11:12:50 +0100 Subject: Unify some error strings. Change-Id: I3ce7d3f84c9654e5c457b9e5f6131ac931e8ba2f Reviewed-by: Karsten Heimrich --- src/libs/installer/addqtcreatorarrayvalueoperation.cpp | 4 ++-- src/libs/installer/copydirectoryoperation.cpp | 5 ++--- src/libs/installer/createdesktopentryoperation.cpp | 8 ++++---- src/libs/installer/createlinkoperation.cpp | 4 ++-- src/libs/installer/createlocalrepositoryoperation.cpp | 4 ++-- src/libs/installer/createshortcutoperation.cpp | 4 ++-- src/libs/installer/elevatedexecuteoperation.cpp | 4 ++-- src/libs/installer/environmentvariablesoperation.cpp | 7 ++++--- src/libs/installer/extractarchiveoperation.cpp | 4 ++-- src/libs/installer/fakestopprocessforupdateoperation.cpp | 2 +- src/libs/installer/globalsettingsoperation.cpp | 10 +++++++--- src/libs/installer/installiconsoperation.cpp | 4 ++-- src/libs/installer/linereplaceoperation.cpp | 8 ++++---- src/libs/installer/macreplaceinstallnamesoperation.cpp | 4 ++-- src/libs/installer/minimumprogressoperation.cpp | 2 +- src/libs/installer/qtpatchoperation.cpp | 4 ++-- src/libs/installer/registerdefaultdebuggeroperation.cpp | 4 ++-- src/libs/installer/registerfiletypeoperation.cpp | 3 ++- src/libs/installer/registerqtvqnxoperation.cpp | 4 ++-- src/libs/installer/registertoolchainoperation.cpp | 8 ++++---- src/libs/installer/replaceoperation.cpp | 4 ++-- src/libs/installer/setdemospathonqtoperation.cpp | 4 ++-- src/libs/installer/setexamplespathonqtoperation.cpp | 4 ++-- src/libs/installer/setimportspathonqtcoreoperation.cpp | 4 ++-- src/libs/installer/setpathonqtcoreoperation.cpp | 4 ++-- src/libs/installer/setpluginpathonqtcoreoperation.cpp | 4 ++-- src/libs/installer/setqtcreatorvalueoperation.cpp | 4 ++-- src/libs/installer/simplemovefileoperation.cpp | 4 ++-- 28 files changed, 67 insertions(+), 62 deletions(-) diff --git a/src/libs/installer/addqtcreatorarrayvalueoperation.cpp b/src/libs/installer/addqtcreatorarrayvalueoperation.cpp index 2d4d15c5c..7da24febe 100644 --- a/src/libs/installer/addqtcreatorarrayvalueoperation.cpp +++ b/src/libs/installer/addqtcreatorarrayvalueoperation.cpp @@ -69,8 +69,8 @@ bool AddQtCreatorArrayValueOperation::performOperation() if (args.count() != 4) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 4 expected (group, " - "arrayname, key, value).").arg(name()).arg( arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 4"), tr(" (group, arrayname, key, value)"))); return false; } diff --git a/src/libs/installer/copydirectoryoperation.cpp b/src/libs/installer/copydirectoryoperation.cpp index 844ca8654..6ee2ec9cb 100644 --- a/src/libs/installer/copydirectoryoperation.cpp +++ b/src/libs/installer/copydirectoryoperation.cpp @@ -76,9 +76,8 @@ bool CopyDirectoryOperation::performOperation() const QStringList args = arguments(); if (args.count() < 2 || args.count() > 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, expected: " - "[forceOverwrite]").arg(name()) - .arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("2 or 3"), tr(" ( [forceOverwrite])"))); return false; } const QString sourcePath = args.at(0); diff --git a/src/libs/installer/createdesktopentryoperation.cpp b/src/libs/installer/createdesktopentryoperation.cpp index cbb6dce7d..da6aa1a14 100644 --- a/src/libs/installer/createdesktopentryoperation.cpp +++ b/src/libs/installer/createdesktopentryoperation.cpp @@ -84,11 +84,11 @@ QString CreateDesktopEntryOperation::absoluteFileName() directory = QDir(*it).absoluteFilePath(QLatin1String("applications")); QDir dir(directory); - // let's see wheter this dir exists or we're able to create it + // let's see whether this dir exists or we're able to create it if (!dir.exists() && !QDir().mkpath(directory)) continue; - // we just try wheter we're able to open the file in ReadWrite + // we just try whether we're able to open the file in ReadWrite QFile file(QDir(directory).absoluteFilePath(filename)); const bool existed = file.exists(); if (!file.open(QIODevice::ReadWrite)) @@ -143,8 +143,8 @@ bool CreateDesktopEntryOperation::performOperation() const QStringList args = arguments(); if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2 expected.").arg(name()).arg(args - .count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/createlinkoperation.cpp b/src/libs/installer/createlinkoperation.cpp index 31524ceef..02ff94df3 100644 --- a/src/libs/installer/createlinkoperation.cpp +++ b/src/libs/installer/createlinkoperation.cpp @@ -65,8 +65,8 @@ bool CreateLinkOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(QObject::tr("Invalid arguments: %1 arguments given, 2 expected").arg( - args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/createlocalrepositoryoperation.cpp b/src/libs/installer/createlocalrepositoryoperation.cpp index 7d780b013..0eb11b3aa 100644 --- a/src/libs/installer/createlocalrepositoryoperation.cpp +++ b/src/libs/installer/createlocalrepositoryoperation.cpp @@ -157,8 +157,8 @@ bool CreateLocalRepositoryOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2 expected.").arg(name()) - .arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp index 6733773df..62f7cfa82 100644 --- a/src/libs/installer/createshortcutoperation.cpp +++ b/src/libs/installer/createshortcutoperation.cpp @@ -181,8 +181,8 @@ bool CreateShortcutOperation::performOperation() if (args.count() != 2 && args.count() != 3) { setError(InvalidArguments); - setErrorString(QObject::tr("Invalid arguments: %1 arguments given, 2 or 3 expected (optional: " - "\"workingDirectory=...\").").arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("2 or 3"), tr(" (optional: 'workingDirectory=...')"))); return false; } diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index cf9425b87..0aa8c101d 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -87,8 +87,8 @@ bool ElevatedExecuteOperation::performOperation() // command line of the external program to execute. if (arguments().isEmpty()) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %1: %2 arguments given, at least 1 expected.").arg(name(), - QString::number(arguments().count()))); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("at least 1"), QLatin1String(""))); return false; } QStringList args; diff --git a/src/libs/installer/environmentvariablesoperation.cpp b/src/libs/installer/environmentvariablesoperation.cpp index 0e838798d..de2eae899 100644 --- a/src/libs/installer/environmentvariablesoperation.cpp +++ b/src/libs/installer/environmentvariablesoperation.cpp @@ -136,10 +136,11 @@ UpdateOperation::Error undoSetting(const QString ®Path, bool EnvironmentVariableOperation::performOperation() { - if (arguments().count() < 2 || arguments().count() > 4) { + QStringList args = arguments(); + if (args.count() != 2 && args.count() != 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2-3 expected.") - .arg(name()).arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("2 or 3"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp index 7cdbc9203..48c5db2c9 100644 --- a/src/libs/installer/extractarchiveoperation.cpp +++ b/src/libs/installer/extractarchiveoperation.cpp @@ -64,8 +64,8 @@ bool ExtractArchiveOperation::performOperation() const QStringList args = arguments(); if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2 expected.").arg(name()).arg(args - .count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/fakestopprocessforupdateoperation.cpp b/src/libs/installer/fakestopprocessforupdateoperation.cpp index 5e895f55e..47d21c39f 100644 --- a/src/libs/installer/fakestopprocessforupdateoperation.cpp +++ b/src/libs/installer/fakestopprocessforupdateoperation.cpp @@ -109,7 +109,7 @@ bool FakeStopProcessForUpdateOperation::undoOperation() setError(KDUpdater::UpdateOperation::NoError); if (arguments().size() != 1) { setError(KDUpdater::UpdateOperation::InvalidArguments, QObject::tr("Number of arguments does not " - "match : one is required")); + "match: one is required")); return false; } diff --git a/src/libs/installer/globalsettingsoperation.cpp b/src/libs/installer/globalsettingsoperation.cpp index 99fa2c156..b8dda3559 100644 --- a/src/libs/installer/globalsettingsoperation.cpp +++ b/src/libs/installer/globalsettingsoperation.cpp @@ -112,6 +112,13 @@ Operation *GlobalSettingsOperation::clone() const QSettingsWrapper *GlobalSettingsOperation::setup(QString *key, QString *value, const QStringList &arguments) { + if (arguments.count() != 3 && arguments.count() != 4) { + setError(InvalidArguments); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments.count()).arg(tr("3 or 4"), QLatin1String(""))); + return 0; + } + if (arguments.count() == 4) { const QString &company = arguments.at(0); const QString &application = arguments.at(1); @@ -125,8 +132,5 @@ QSettingsWrapper *GlobalSettingsOperation::setup(QString *key, QString *value, c return new QSettingsWrapper(filename, QSettingsWrapper::NativeFormat); } - setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, at least 3 expected.") - .arg(name()).arg(arguments.count())); return 0; } diff --git a/src/libs/installer/installiconsoperation.cpp b/src/libs/installer/installiconsoperation.cpp index 7779a8139..f46ab5315 100644 --- a/src/libs/installer/installiconsoperation.cpp +++ b/src/libs/installer/installiconsoperation.cpp @@ -137,8 +137,8 @@ bool InstallIconsOperation::performOperation() const QStringList args = arguments(); if ((args.count() != 1) && (args.count() != 2)) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 1 or 2 expected (Sourcepath, [Vendorprefix]).") - .arg(name()).arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("1 or 2"), tr(" (Sourcepath, [Vendorprefix])"))); return false; } diff --git a/src/libs/installer/linereplaceoperation.cpp b/src/libs/installer/linereplaceoperation.cpp index e6f483f0e..6c13f1716 100644 --- a/src/libs/installer/linereplaceoperation.cpp +++ b/src/libs/installer/linereplaceoperation.cpp @@ -66,8 +66,8 @@ bool LineReplaceOperation::performOperation() // 3. Replace-Line-String if (args.count() != 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 3 expected.").arg(name()).arg(args - .count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 3"), QLatin1String(""))); return false; } const QString fileName = args.at(0); @@ -77,7 +77,7 @@ bool LineReplaceOperation::performOperation() QFile file(fileName); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { setError(UserDefinedError); - setErrorString(QObject::tr("Failed to open %1 for reading.").arg(fileName)); + setErrorString(QObject::tr("Failed to open '%1' for reading.").arg(fileName)); return false; } @@ -94,7 +94,7 @@ bool LineReplaceOperation::performOperation() if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { setError(UserDefinedError); - setErrorString(QObject::tr("Failed to open %1 for writing.").arg(fileName)); + setErrorString(QObject::tr("Failed to open '%1' for writing.").arg(fileName)); return false; } diff --git a/src/libs/installer/macreplaceinstallnamesoperation.cpp b/src/libs/installer/macreplaceinstallnamesoperation.cpp index 8eb18627d..a79072481 100644 --- a/src/libs/installer/macreplaceinstallnamesoperation.cpp +++ b/src/libs/installer/macreplaceinstallnamesoperation.cpp @@ -70,8 +70,8 @@ bool MacReplaceInstallNamesOperation::performOperation() if (arguments().count() < 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 3 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("at least 3"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/minimumprogressoperation.cpp b/src/libs/installer/minimumprogressoperation.cpp index 6d35b6f85..4fe298c29 100644 --- a/src/libs/installer/minimumprogressoperation.cpp +++ b/src/libs/installer/minimumprogressoperation.cpp @@ -45,7 +45,7 @@ using namespace QInstaller; MinimumProgressOperation::MinimumProgressOperation() { - //this shouldn't be call able by script, but we need a name for the binary format + // This shouldn't be callable by script, but we need a name for the binary format setName(QLatin1String("MinimumProgress")); } diff --git a/src/libs/installer/qtpatchoperation.cpp b/src/libs/installer/qtpatchoperation.cpp index da828fd9b..573db7777 100644 --- a/src/libs/installer/qtpatchoperation.cpp +++ b/src/libs/installer/qtpatchoperation.cpp @@ -163,8 +163,8 @@ bool QtPatchOperation::performOperation() if (arguments().count() != 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 3 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 3"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/registerdefaultdebuggeroperation.cpp b/src/libs/installer/registerdefaultdebuggeroperation.cpp index c3762b7c4..d6cdac851 100644 --- a/src/libs/installer/registerdefaultdebuggeroperation.cpp +++ b/src/libs/installer/registerdefaultdebuggeroperation.cpp @@ -90,8 +90,8 @@ bool RegisterDefaultDebuggerOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2 expected.") - .arg(name()).arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/registerfiletypeoperation.cpp b/src/libs/installer/registerfiletypeoperation.cpp index 49780f2b4..7fecde2cb 100644 --- a/src/libs/installer/registerfiletypeoperation.cpp +++ b/src/libs/installer/registerfiletypeoperation.cpp @@ -103,7 +103,8 @@ bool RegisterFileTypeOperation::performOperation() if (args.count() < 2 || args.count() > 5) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0").arg(name())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("2 to 5"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/registerqtvqnxoperation.cpp b/src/libs/installer/registerqtvqnxoperation.cpp index 313687b5b..b52558145 100644 --- a/src/libs/installer/registerqtvqnxoperation.cpp +++ b/src/libs/installer/registerqtvqnxoperation.cpp @@ -101,8 +101,8 @@ bool RegisterQtInCreatorQNXOperation::performOperation() if (args.count() < 5) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, minimum 5 expected.") - .arg(name()).arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("at least 5"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/registertoolchainoperation.cpp b/src/libs/installer/registertoolchainoperation.cpp index e0fb5324e..0caf1451b 100644 --- a/src/libs/installer/registertoolchainoperation.cpp +++ b/src/libs/installer/registertoolchainoperation.cpp @@ -71,8 +71,8 @@ bool RegisterToolChainOperation::performOperation() if (args.count() < 4) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, minimum 4 expected.") - .arg(name()).arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("at least 4"), QLatin1String(""))); return false; } @@ -81,12 +81,12 @@ bool RegisterToolChainOperation::performOperation() PackageManagerCore *const core = value(QLatin1String("installer")).value(); if (!core) { setError(UserDefinedError); - setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name())); + setErrorString(tr("Needed installer object in '%1' operation is empty.").arg(name())); return false; } if (core->value(scQtCreatorInstallerToolchainsFile).isEmpty()) { setError(UserDefinedError); - setErrorString(tr("There is no value set for %1 on the installer object.").arg( + setErrorString(tr("There is no value set for '%1' on the installer object.").arg( scQtCreatorInstallerToolchainsFile)); return false; } diff --git a/src/libs/installer/replaceoperation.cpp b/src/libs/installer/replaceoperation.cpp index 556706ba5..c172a2661 100644 --- a/src/libs/installer/replaceoperation.cpp +++ b/src/libs/installer/replaceoperation.cpp @@ -66,8 +66,8 @@ bool ReplaceOperation::performOperation() // 3. Replace-String if (args.count() != 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, 3 expected.").arg(name()).arg(args - .count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 3"), QLatin1String(""))); return false; } const QString fileName = args.at(0); diff --git a/src/libs/installer/setdemospathonqtoperation.cpp b/src/libs/installer/setdemospathonqtoperation.cpp index b18646177..d558b3e21 100644 --- a/src/libs/installer/setdemospathonqtoperation.cpp +++ b/src/libs/installer/setdemospathonqtoperation.cpp @@ -64,8 +64,8 @@ bool SetDemosPathOnQtOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 2 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/setexamplespathonqtoperation.cpp b/src/libs/installer/setexamplespathonqtoperation.cpp index 49a24601d..e73aed25a 100644 --- a/src/libs/installer/setexamplespathonqtoperation.cpp +++ b/src/libs/installer/setexamplespathonqtoperation.cpp @@ -64,8 +64,8 @@ bool SetExamplesPathOnQtOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 2 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/setimportspathonqtcoreoperation.cpp b/src/libs/installer/setimportspathonqtcoreoperation.cpp index a44d74f2b..685aee846 100644 --- a/src/libs/installer/setimportspathonqtcoreoperation.cpp +++ b/src/libs/installer/setimportspathonqtcoreoperation.cpp @@ -107,8 +107,8 @@ bool SetImportsPathOnQtCoreOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 2 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/setpathonqtcoreoperation.cpp b/src/libs/installer/setpathonqtcoreoperation.cpp index a64dfae12..c6950246d 100644 --- a/src/libs/installer/setpathonqtcoreoperation.cpp +++ b/src/libs/installer/setpathonqtcoreoperation.cpp @@ -111,8 +111,8 @@ bool SetPathOnQtCoreOperation::performOperation() if (args.count() != 3) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 3 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 3"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/setpluginpathonqtcoreoperation.cpp b/src/libs/installer/setpluginpathonqtcoreoperation.cpp index de9057b4b..cafdda24c 100644 --- a/src/libs/installer/setpluginpathonqtcoreoperation.cpp +++ b/src/libs/installer/setpluginpathonqtcoreoperation.cpp @@ -106,8 +106,8 @@ bool SetPluginPathOnQtCoreOperation::performOperation() if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 2 expected.").arg(name()) - .arg(arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } diff --git a/src/libs/installer/setqtcreatorvalueoperation.cpp b/src/libs/installer/setqtcreatorvalueoperation.cpp index 24e3ced4e..28e0f9134 100644 --- a/src/libs/installer/setqtcreatorvalueoperation.cpp +++ b/src/libs/installer/setqtcreatorvalueoperation.cpp @@ -69,8 +69,8 @@ bool SetQtCreatorValueOperation::performOperation() if (args.count() != 4) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 4 expected (rootInstallPath, " - "group, key, value).").arg(name()).arg( arguments().count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 4"), tr(" (rootInstallPath, group, key, value)"))); return false; } diff --git a/src/libs/installer/simplemovefileoperation.cpp b/src/libs/installer/simplemovefileoperation.cpp index 2985c562a..61e317300 100644 --- a/src/libs/installer/simplemovefileoperation.cpp +++ b/src/libs/installer/simplemovefileoperation.cpp @@ -59,8 +59,8 @@ bool SimpleMoveFileOperation::performOperation() const QStringList args = arguments(); if (args.count() != 2) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: %1 arguments given, exactly 2 expected.").arg(name()) - .arg(args.count())); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.") + .arg(name()).arg(arguments().count()).arg(tr("exactly 2"), QLatin1String(""))); return false; } -- cgit v1.2.3