2017-04-27 18:24:53 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2013-10-09 05:44:38 +00:00
|
|
|
#ifndef GETTEXTFROMC_H
|
|
|
|
#define GETTEXTFROMC_H
|
2013-10-06 15:55:58 +00:00
|
|
|
|
2013-10-09 05:44:38 +00:00
|
|
|
#include <QHash>
|
2014-04-30 05:35:34 +00:00
|
|
|
#include <QCoreApplication>
|
2013-10-06 15:55:58 +00:00
|
|
|
|
2013-10-10 07:15:21 +00:00
|
|
|
extern "C" const char *trGettext(const char *text);
|
2013-10-06 15:55:58 +00:00
|
|
|
|
2014-02-28 04:09:57 +00:00
|
|
|
class gettextFromC {
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(gettextFromC)
|
2013-10-06 15:55:58 +00:00
|
|
|
public:
|
|
|
|
static gettextFromC *instance();
|
2013-10-10 07:15:21 +00:00
|
|
|
const char *trGettext(const char *text);
|
2013-10-09 05:44:38 +00:00
|
|
|
void reset(void);
|
2014-02-28 04:09:57 +00:00
|
|
|
QHash<QByteArray, QByteArray> translationCache;
|
2013-10-06 15:55:58 +00:00
|
|
|
};
|
|
|
|
|
2013-10-09 05:44:38 +00:00
|
|
|
#endif // GETTEXTFROMC_H
|