summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-03 16:52:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-04 05:33:31 +0800
commit57c01f7a66ccd04fc2e83b67a840519db4661798 (patch)
tree4134dd2be823ea62ab3370cfb7ee567a6a53d4ec /desktop-widgets/subsurfacewebservices.cpp
parent2f951413303e10a80e540cacd0c6c282f8ce82cc (diff)
downloadsubsurface-57c01f7a66ccd04fc2e83b67a840519db4661798.tar.gz
Translations: unify gettextFromC::tr() and QObject::tr()
There were two catch-all classes for translations outside of class context. gettextFromC was used exclusively from C, but C++ used both, gettextFromC and QObject. Some of the string were even present in both. Therefore, unify to gettextFromC throughout the code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/subsurfacewebservices.cpp')
-rw-r--r--desktop-widgets/subsurfacewebservices.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp
index d5a6f005f..5ed068d2f 100644
--- a/desktop-widgets/subsurfacewebservices.cpp
+++ b/desktop-widgets/subsurfacewebservices.cpp
@@ -620,7 +620,7 @@ static DiveListResult parseDiveLogsDeDiveList(const QByteArray &xmlData)
* </DiveDateReader>
*/
QXmlStreamReader reader(xmlData);
- const QString invalidXmlError = QObject::tr("Invalid response from server");
+ const QString invalidXmlError = gettextFromC::tr("Invalid response from server");
bool seenDiveDates = false;
DiveListResult result;
result.idCount = 0;
@@ -628,7 +628,7 @@ static DiveListResult parseDiveLogsDeDiveList(const QByteArray &xmlData)
if (reader.readNextStartElement() && reader.name() != "DiveDateReader") {
result.errorCondition = invalidXmlError;
result.errorDetails =
- QObject::tr("Expected XML tag 'DiveDateReader', got instead '%1")
+ gettextFromC::tr("Expected XML tag 'DiveDateReader', got instead '%1")
.arg(reader.name().toString());
goto out;
}
@@ -674,14 +674,14 @@ static DiveListResult parseDiveLogsDeDiveList(const QByteArray &xmlData)
if (!seenDiveDates) {
result.errorCondition = invalidXmlError;
- result.errorDetails = QObject::tr("Expected XML tag 'DiveDates' not found");
+ result.errorDetails = gettextFromC::tr("Expected XML tag 'DiveDates' not found");
}
out:
if (reader.hasError()) {
// if there was an XML error, overwrite the result or other error conditions
result.errorCondition = invalidXmlError;
- result.errorDetails = QObject::tr("Malformed XML response. Line %1: %2")
+ result.errorDetails = gettextFromC::tr("Malformed XML response. Line %1: %2")
.arg(reader.lineNumber())
.arg(reader.errorString());
}