mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
4d3e74a236
This compiles and looks about right, but it doesn't appear to work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
19 lines
373 B
C++
19 lines
373 B
C++
#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);
|
|
}
|