subsurface/core/gettextfromc.h
Berthold Stoeger 879cb73b8b 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>
2018-06-24 20:31:14 +02:00

13 lines
253 B
C++

// SPDX-License-Identifier: GPL-2.0
#ifndef GETTEXTFROMC_H
#define GETTEXTFROMC_H
#include <QCoreApplication>
extern "C" const char *trGettext(const char *text);
class gettextFromC {
Q_DECLARE_TR_FUNCTIONS(gettextFromC)
};
#endif // GETTEXTFROMC_H