diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-10-06 10:57:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-06 10:57:16 -0700 |
commit | b3490213f42ed63bc4b05b37bcfc12809f2d432c (patch) | |
tree | d56ede6f1ea8d20c2120eba2b9ca705927a77913 /gettextfromc.cpp | |
parent | 92d8978ab4ad980397883b50d0e7bc81d2bf5f73 (diff) | |
parent | 70352c3962cf3b4379590326cdc489ac0543f7e9 (diff) | |
download | subsurface-b3490213f42ed63bc4b05b37bcfc12809f2d432c.tar.gz |
Merge branch 'glib-removal-hack'
Fix obvious merge issue in Rules.mk
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gettextfromc.cpp')
-rw-r--r-- | gettextfromc.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gettextfromc.cpp b/gettextfromc.cpp new file mode 100644 index 000000000..4976d70f8 --- /dev/null +++ b/gettextfromc.cpp @@ -0,0 +1,19 @@ +#include <QCoreApplication> +#include <QString> +#include <gettextfromc.h> + +char *gettextFromC::gettext(const char *text) +{ + return tr(text).toLocal8Bit().data(); +} + +gettextFromC* gettextFromC::instance() +{ + static gettextFromC *self = new gettextFromC(); + return self; +} + +extern "C" const char *gettext(const char *text) +{ + return gettextFromC::instance()->gettext(text); +} |