summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/binarycontent.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-24 10:15:16 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-24 09:22:42 +0000
commit1e589e37a991b29076e9a661f92dfa178421c208 (patch)
treeccdae70edb75b1bc17f0efc61086e16554e3f4eb /src/libs/installer/binarycontent.cpp
parent65a5d4d33c7dcb27ce99ce59535733a28991c544 (diff)
Unify translated error messages
* Enclose file paths in "" * Localize file paths with QDir::toNativeSeparators. * Make sure sentences end with a '.' * Append error details always by ':', e.g. tr("Failed to copy file '%1': %2").(...) * Use 'directory' instead of 'folder' everywhere Change-Id: Ie045f429f72ad5045c96537465c5fb9d2e99d250 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/binarycontent.cpp')
-rw-r--r--src/libs/installer/binarycontent.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/installer/binarycontent.cpp b/src/libs/installer/binarycontent.cpp
index 0aa3de84b..dc8753e43 100644
--- a/src/libs/installer/binarycontent.cpp
+++ b/src/libs/installer/binarycontent.cpp
@@ -119,7 +119,7 @@ BinaryLayout BinaryContent::binaryLayout(QFile *file, quint64 magicCookie)
const qint64 posOfMetaDataCount = layout.endOfBinaryContent - (4 * sizeof(qint64));
if (!file->seek(posOfMetaDataCount)) {
throw QInstaller::Error(QCoreApplication::translate("BinaryLayout",
- "Could not seek to %1 to read the embedded meta data count.").arg(posOfMetaDataCount));
+ "Cannot seek to %1 to read the embedded meta data count.").arg(posOfMetaDataCount));
}
// read the meta resources count
@@ -130,7 +130,7 @@ BinaryLayout BinaryContent::binaryLayout(QFile *file, quint64 magicCookie)
+ (8 * sizeof(qint64))); // meta count, offset/length collection index, marker, cookie...
if (!file->seek(posOfResourceCollectionsSegment)) {
throw Error(QCoreApplication::translate("BinaryLayout",
- "Could not seek to %1 to read the resource collection segment.")
+ "Cannot seek to %1 to read the resource collection segment.")
.arg(posOfResourceCollectionsSegment));
}
@@ -205,7 +205,7 @@ void BinaryContent::readBinaryContent(QFile *file, QList<OperationBlob> *operati
const qint64 posOfOperationsBlock = layout.operationsSegment.start();
if (!file->seek(posOfOperationsBlock)) {
throw Error(QCoreApplication::translate("BinaryContent",
- "Could not seek to %1 to read the operation data.").arg(posOfOperationsBlock));
+ "Cannot seek to %1 to read the operation data.").arg(posOfOperationsBlock));
}
// read the operations count
qint64 operationsCount = QInstaller::retrieveInt64(file);
@@ -222,7 +222,7 @@ void BinaryContent::readBinaryContent(QFile *file, QList<OperationBlob> *operati
if (manager) { // read the collection index and data
const qint64 posOfResourceCollectionBlock = layout.resourceCollectionsSegment.start();
if (!file->seek(posOfResourceCollectionBlock)) {
- throw Error(QCoreApplication::translate("BinaryContent", "Could not seek to %1 to "
+ throw Error(QCoreApplication::translate("BinaryContent", "Cannot seek to %1 to "
"read the resource collection block.").arg(posOfResourceCollectionBlock));
}
manager->read(file, layout.endOfExectuable);
@@ -261,7 +261,7 @@ void BinaryContent::writeBinaryContent(QFile *out, const QList<OperationBlob> &o
const bool isOpen = resource->isOpen();
if ((!isOpen) && (!resource->open())) {
throw Error(QCoreApplication::translate("BinaryContent",
- "Could not open meta resource. Error: %1").arg(resource->errorString()));
+ "Cannot open meta resource %1.").arg(resource->errorString()));
}
resource->seek(0);