summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-15 09:40:20 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-15 13:22:59 +0000
commit80b2694aede1ed736c619f76cb7b6250a913635b (patch)
treecc6424dd6e51e56a5405180e019845aa4718d5a3
parent4d3234760d3f785000400621ba0ac90a2c27c9dd (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>
-rw-r--r--src/libs/installer/copydirectoryoperation.cpp10
-rw-r--r--src/libs/installer/createlocalrepositoryoperation.cpp4
-rw-r--r--tools/common/repositorygen.cpp2
3 files changed, 8 insertions, 8 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());
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp
index 5ccb0e696..a688742f7 100644
--- a/tools/common/repositorygen.cpp
+++ b/tools/common/repositorygen.cpp
@@ -218,7 +218,7 @@ void QInstallerTools::copyMetaData(const QString &_targetDir, const QString &met
if (foundDefault && foundVirtual) {
throw QInstaller::Error(QString::fromLatin1("Error: <Default> and <Virtual> elements are "
- "mutually exclusive. File: '%0'").arg(packageXmlPath));
+ "mutually exclusive. File: '%1'").arg(packageXmlPath));
}
if (!foundDisplayName) {