Refactor QmuTranslation to not allocate memory.
--HG-- branch : develop
This commit is contained in:
parent
7a62022f88
commit
b547adf344
|
@ -30,8 +30,8 @@ namespace qmu
|
||||||
{
|
{
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QmuTranslation QmuTranslation::translate(const QString &context, const QString &sourceText,
|
QmuTranslation QmuTranslation::translate(const char *context, const char *sourceText,
|
||||||
const QString &disambiguation, int n)
|
const char *disambiguation, int n)
|
||||||
{
|
{
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,13 +54,13 @@ class QMUPARSERSHARED_EXPORT QmuTranslation
|
||||||
public:
|
public:
|
||||||
QmuTranslation();
|
QmuTranslation();
|
||||||
~QmuTranslation(){}
|
~QmuTranslation(){}
|
||||||
QmuTranslation(const QString &context, const QString &sourceText, const QString &disambiguation = nullptr,
|
QmuTranslation(const QString &context, const QString &sourceText, const QString &disambiguation = QString(),
|
||||||
int n = -1);
|
int n = -1);
|
||||||
QmuTranslation &operator=(const QmuTranslation &tr);
|
QmuTranslation &operator=(const QmuTranslation &tr);
|
||||||
QmuTranslation(const QmuTranslation &tr);
|
QmuTranslation(const QmuTranslation &tr);
|
||||||
QString translate(const QString &locale) const;
|
QString translate(const QString &locale) const;
|
||||||
static QmuTranslation translate(const QString &context, const QString &sourceText,
|
static QmuTranslation translate(const char * context, const char * sourceText,
|
||||||
const QString &disambiguation = nullptr, int n = -1);
|
const char * disambiguation = nullptr, int n = -1);
|
||||||
QString getMcontext() const;
|
QString getMcontext() const;
|
||||||
QString getMsourceText() const;
|
QString getMsourceText() const;
|
||||||
QString getMdisambiguation() const;
|
QString getMdisambiguation() const;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user