aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gettext.h4
-rw-r--r--gettextfromc.cpp6
-rw-r--r--gettextfromc.h4
-rw-r--r--qt-gui.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/gettext.h b/gettext.h
index 5f987c1a4..84910bb23 100644
--- a/gettext.h
+++ b/gettext.h
@@ -2,8 +2,8 @@
#define MYGETTEXT_H
/* this is for the Qt based translations */
-extern const char *gettext(const char *);
-#define translate(_context, arg) gettext(arg)
+extern const char *trGettext(const char *);
+#define translate(_context, arg) trGettext(arg)
#define QT_TRANSLATE_NOOP(_context, arg) arg
#endif // MYGETTEXT_H
diff --git a/gettextfromc.cpp b/gettextfromc.cpp
index de278afeb..1730b52b0 100644
--- a/gettextfromc.cpp
+++ b/gettextfromc.cpp
@@ -2,7 +2,7 @@
#include <QString>
#include <gettextfromc.h>
-const char *gettextFromC::gettext(const char *text)
+const char *gettextFromC::trGettext(const char *text)
{
QByteArray &result = translationCache[text];
if (result.isEmpty())
@@ -21,7 +21,7 @@ gettextFromC* gettextFromC::instance()
return self;
}
-extern "C" const char *gettext(const char *text)
+extern "C" const char *trGettext(const char *text)
{
- return gettextFromC::instance()->gettext(text);
+ return gettextFromC::instance()->trGettext(text);
}
diff --git a/gettextfromc.h b/gettextfromc.h
index 7d7bca142..19f02fc96 100644
--- a/gettextfromc.h
+++ b/gettextfromc.h
@@ -3,14 +3,14 @@
#include <QHash>
-extern "C" const char *gettext(const char *text);
+extern "C" const char *trGettext(const char *text);
class gettextFromC
{
Q_DECLARE_TR_FUNCTIONS(gettextFromC)
public:
static gettextFromC *instance();
- const char *gettext(const char *text);
+ const char *trGettext(const char *text);
void reset(void);
QHash <const char *, QByteArray> translationCache;
};
diff --git a/qt-gui.cpp b/qt-gui.cpp
index f361e34df..e0cff0b2b 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -41,7 +41,7 @@
#include <gettextfromc.h>
// this will create a warning when executing lupdate
-#define translate(_context, arg) gettextFromC::instance()->tr("gettextFromC",arg)
+#define translate(_context, arg) gettextFromC::instance()->tr(arg)
const char *default_dive_computer_vendor;
const char *default_dive_computer_product;