mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use QObject::tr instead of OurClasses::tr for functions
This will make more easy to move code around in the future. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
887f9e63c3
commit
e38595f684
2 changed files with 12 additions and 12 deletions
|
@ -517,7 +517,7 @@ static DiveListResult parseDiveLogsDeDiveList(const QByteArray &xmlData)
|
|||
* </DiveDateReader>
|
||||
*/
|
||||
QXmlStreamReader reader(xmlData);
|
||||
const QString invalidXmlError = DivelogsDeWebServices::tr("Invalid response from server");
|
||||
const QString invalidXmlError = QObject::tr("Invalid response from server");
|
||||
bool seenDiveDates = false;
|
||||
DiveListResult result;
|
||||
result.idCount = 0;
|
||||
|
@ -525,7 +525,7 @@ static DiveListResult parseDiveLogsDeDiveList(const QByteArray &xmlData)
|
|||
if (reader.readNextStartElement() && reader.name() != "DiveDateReader") {
|
||||
result.errorCondition = invalidXmlError;
|
||||
result.errorDetails =
|
||||
DivelogsDeWebServices::tr("Expected XML tag 'DiveDateReader', got instead '%1")
|
||||
QObject::tr("Expected XML tag 'DiveDateReader', got instead '%1")
|
||||
.arg(reader.name().toString());
|
||||
goto out;
|
||||
}
|
||||
|
@ -571,14 +571,14 @@ static DiveListResult parseDiveLogsDeDiveList(const QByteArray &xmlData)
|
|||
|
||||
if (!seenDiveDates) {
|
||||
result.errorCondition = invalidXmlError;
|
||||
result.errorDetails = DivelogsDeWebServices::tr("Expected XML tag 'DiveDates' not found");
|
||||
result.errorDetails = QObject::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 = DivelogsDeWebServices::tr("Malformed XML response. Line %1: %2")
|
||||
result.errorDetails = QObject::tr("Malformed XML response. Line %1: %2")
|
||||
.arg(reader.lineNumber())
|
||||
.arg(reader.errorString());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue