diff options
author | Niels Weber <niels.weber@digia.com> | 2013-06-17 11:05:14 +0200 |
---|---|---|
committer | Niels Weber <niels.weber@digia.com> | 2013-06-17 11:12:27 +0200 |
commit | 6a3d450f46ecbd4eaf353f82022f880e98c9aa48 (patch) | |
tree | cc1fefc409cf24e08ee4c3f4e843932a85131c31 | |
parent | 06d10d2f65d11fec14eba230257b3c52e0be97bc (diff) |
Use standard form of error strings in AppendFileOperation.
Change-Id: I49a3e987b509cf833d92c732aa48b81ae260eb45
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
-rw-r--r-- | src/libs/kdtools/kdupdaterupdateoperations.cpp | 5 |
1 files 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); |