From 6a3d450f46ecbd4eaf353f82022f880e98c9aa48 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Mon, 17 Jun 2013 11:05:14 +0200 Subject: Use standard form of error strings in AppendFileOperation. Change-Id: I49a3e987b509cf833d92c732aa48b81ae260eb45 Reviewed-by: Karsten Heimrich --- src/libs/kdtools/kdupdaterupdateoperations.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/kdtools/kdupdaterupdateoperations.cpp b/src/libs/kdtools/kdupdaterupdateoperations.cpp index 41f9ef289..e3e984374 100644 --- a/src/libs/kdtools/kdupdaterupdateoperations.cpp +++ b/src/libs/kdtools/kdupdaterupdateoperations.cpp @@ -583,7 +583,8 @@ bool AppendFileOperation::performOperation() const QStringList args = this->arguments(); if (args.count() != 2) { setError(InvalidArguments); - setErrorString(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; } @@ -595,7 +596,7 @@ bool AppendFileOperation::performOperation() if (!QFile::rename(fName, newName) && QFile::copy(newName, fName) && file.open(QFile::Append)) { QFile::rename(newName, fName); setError(UserDefinedError); - setErrorString(tr("Could not open file %1 for writing: %2").arg(file.fileName(), file.errorString())); + setErrorString(tr("Could not open file '%1' for writing: %2").arg(file.fileName(), file.errorString())); return false; } deleteFileNowOrLater(newName); -- cgit v1.2.3