diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-15 09:40:20 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-15 13:22:59 +0000 |
commit | 80b2694aede1ed736c619f76cb7b6250a913635b (patch) | |
tree | cc6424dd6e51e56a5405180e019845aa4718d5a3 /src/libs/installer | |
parent | 4d3234760d3f785000400621ba0ac90a2c27c9dd (diff) |
Remove %0 from tr() calls
The placeholder of the first argument to QString::tr() is %1, not %0.
Change-Id: I69fcddb42ddbfda27dfb4430f03ebef156280c64
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer')
-rw-r--r-- | src/libs/installer/copydirectoryoperation.cpp | 10 | ||||
-rw-r--r-- | src/libs/installer/createlocalrepositoryoperation.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/installer/copydirectoryoperation.cpp b/src/libs/installer/copydirectoryoperation.cpp index 172cdddba..06c952993 100644 --- a/src/libs/installer/copydirectoryoperation.cpp +++ b/src/libs/installer/copydirectoryoperation.cpp @@ -77,7 +77,7 @@ bool CopyDirectoryOperation::performOperation() overwrite = true; } else { setError(InvalidArguments); - setErrorString(tr("Invalid argument in %0: Third argument needs to be forceOverwrite, " + setErrorString(tr("Invalid argument in %1: Third argument needs to be forceOverwrite, " "if specified").arg(name())); return false; } @@ -87,7 +87,7 @@ bool CopyDirectoryOperation::performOperation() const QFileInfo targetInfo(targetPath); if (!sourceInfo.exists() || !sourceInfo.isDir() || !targetInfo.exists() || !targetInfo.isDir()) { setError(InvalidArguments); - setErrorString(tr("Invalid arguments in %0: Directories are invalid: %1 %2").arg(name()) + setErrorString(tr("Invalid arguments in %1: Directories are invalid: %2 %3").arg(name()) .arg(sourcePath).arg(targetPath)); return false; } @@ -120,7 +120,7 @@ bool CopyDirectoryOperation::performOperation() } else if (itemInfo.isDir()) { if (!targetDir.mkpath(targetDir.absoluteFilePath(relativePath))) { setError(InvalidArguments); - setErrorString(tr("Could not create %0").arg(targetDir.absoluteFilePath(relativePath))); + setErrorString(tr("Could not create %1").arg(targetDir.absoluteFilePath(relativePath))); return false; } } else { @@ -133,7 +133,7 @@ bool CopyDirectoryOperation::performOperation() QFile file(sourceDir.absoluteFilePath(itemName)); if (!file.copy(absolutePath)) { setError(UserDefinedError); - setErrorString(tr("Could not copy %0 to %1, error was: %3").arg(sourceDir.absoluteFilePath(itemName), + setErrorString(tr("Could not copy %1 to %2, error was: %3").arg(sourceDir.absoluteFilePath(itemName), targetDir.absoluteFilePath(relativePath), file.errorString())); return false; @@ -154,7 +154,7 @@ bool CopyDirectoryOperation::undoOperation() foreach (const QString &file, files) { if (!QFile::remove(file)) { setError(InvalidArguments); - setErrorString(tr("Could not remove %0").arg(file)); + setErrorString(tr("Could not remove %1").arg(file)); return false; } dir.rmpath(QFileInfo(file).absolutePath()); diff --git a/src/libs/installer/createlocalrepositoryoperation.cpp b/src/libs/installer/createlocalrepositoryoperation.cpp index ddd9a0c25..170065742 100644 --- a/src/libs/installer/createlocalrepositoryoperation.cpp +++ b/src/libs/installer/createlocalrepositoryoperation.cpp @@ -332,10 +332,10 @@ bool CreateLocalRepositoryOperation::undoOperation() QDir dir; const QStringList files = value(QLatin1String("files")).toStringList(); foreach (const QString &file, files) { - emit outputTextChanged(tr("Removing file: %0").arg(file)); + emit outputTextChanged(tr("Removing file: %1").arg(file)); if (!QFile::remove(file)) { setError(InvalidArguments); - setErrorString(tr("Could not remove %0.").arg(file)); + setErrorString(tr("Could not remove %1.").arg(file)); return false; } dir.rmpath(QFileInfo(file).absolutePath()); |