summaryrefslogtreecommitdiffstats
path: root/qt-models/divelocationmodel.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-06-17 21:03:16 +0200
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2018-06-24 20:31:14 +0200
commit879cb73b8bda364f63cc97c0f9963cfddc581add (patch)
tree3f800beb71313141ad55b7131ef746a3083330b0 /qt-models/divelocationmodel.cpp
parent61b8add59078f3a55dc02dc63639173be03fdf41 (diff)
downloadsubsurface-879cb73b8bda364f63cc97c0f9963cfddc581add.tar.gz
Localization: remove gettextFromC::instance()
There were a handfull instances of the kind 1) gettextFromC::instance()->tr(...) 2) gettextFromC::instance()->trGettext(...) 1) is pointless, as tr is a static function. All instances of 2) were likewise pointless, because trGettext() returns a C-string, which was then immediately converted to a QString. Thus, replace both constructs by gettextFromC::tr(...). After this change there was only one user of gettextFromC::instance() left, viz. the C-interface funtion trGettext(). Therefore, remove gettextFromC::instance() and do all the caching / translating directly in the global trGettext(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelocationmodel.cpp')
-rw-r--r--qt-models/divelocationmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp
index c706744a3..2e62997f9 100644
--- a/qt-models/divelocationmodel.cpp
+++ b/qt-models/divelocationmodel.cpp
@@ -176,7 +176,7 @@ GeoReferencingOptionsModel::GeoReferencingOptionsModel(QObject *parent) : QStrin
QStringList list;
int i;
for (i = 0; i < TC_NR_CATEGORIES; i++)
- list << gettextFromC::instance()->trGettext(taxonomy_category_names[i]);
+ list << gettextFromC::tr(taxonomy_category_names[i]);
setStringList(list);
}