summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/registerfiletypeoperation.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-15 11:44:09 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-15 12:00:02 +0000
commit4d3234760d3f785000400621ba0ac90a2c27c9dd (patch)
tree8b0e479378a66ff4d5af22bcd466ce23011f8e12 /src/libs/installer/registerfiletypeoperation.cpp
parent1dbb78505421cc0cd2dd94f3304dae119a92152a (diff)
Use checkArgumentsCount for RegisterFileType operation, too
Was forgotten in 80439d01e2feb1342dc470627585559c97805be3. Change-Id: I2a2d4db1875c308346aa62f5ceb31c26c5798d3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/registerfiletypeoperation.cpp')
-rw-r--r--src/libs/installer/registerfiletypeoperation.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libs/installer/registerfiletypeoperation.cpp b/src/libs/installer/registerfiletypeoperation.cpp
index 4a83f4b21..181d4a7f8 100644
--- a/src/libs/installer/registerfiletypeoperation.cpp
+++ b/src/libs/installer/registerfiletypeoperation.cpp
@@ -95,12 +95,8 @@ bool RegisterFileTypeOperation::performOperation()
QStringList args = arguments();
QString progId = takeProgIdArgument(args);
- if (args.count() < 2 || args.count() > 5) {
- setError(InvalidArguments);
- setErrorString(tr("Invalid arguments in %0: %1 arguments given, %2 expected%3.")
- .arg(name()).arg(arguments().count()).arg(tr("2 to 5"), QLatin1String("")));
+ if (!checkArgumentCount(2, 5, tr("<extension> <command> [description [contentType [icon]]]")))
return false;
- }
bool allUsers = false;
PackageManagerCore *const core = value(QLatin1String("installer")).value<PackageManagerCore*>();