diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-07-03 16:52:20 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-04 05:33:31 +0800 |
commit | 57c01f7a66ccd04fc2e83b67a840519db4661798 (patch) | |
tree | 4134dd2be823ea62ab3370cfb7ee567a6a53d4ec /core/subsurface-qt | |
parent | 2f951413303e10a80e540cacd0c6c282f8ce82cc (diff) | |
download | subsurface-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 'core/subsurface-qt')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 46f274522..4c5a30912 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -27,7 +27,7 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx) const char *desc = cyl->type.description; if (!desc && idx > 0) return QString(EMPTY_DIVE_STRING); - QString fmt = desc ? QString(desc) : QObject::tr("unknown"); + QString fmt = desc ? QString(desc) : gettextFromC::tr("unknown"); fmt += ", " + get_volume_string(cyl->type.size, true); fmt += ", " + get_pressure_string(cyl->type.workingpressure, true); fmt += ", " + get_pressure_string(cyl->start, false) + " - " + get_pressure_string(cyl->end, true); @@ -129,7 +129,7 @@ QVariant DiveObjectHelper::dive_site_uuid() const QString DiveObjectHelper::duration() const { - return get_dive_duration_string(m_dive->duration.seconds, QObject::tr("h"), QObject::tr("min")); + return get_dive_duration_string(m_dive->duration.seconds, gettextFromC::tr("h"), gettextFromC::tr("min")); } bool DiveObjectHelper::noDive() const |