From b547adf3445ac05e4a43bd9faa96ffacc6094308 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 15 Mar 2018 08:51:47 +0200 Subject: [PATCH] Refactor QmuTranslation to not allocate memory. --HG-- branch : develop --- src/libs/qmuparser/qmutranslation.cpp | 4 ++-- src/libs/qmuparser/qmutranslation.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/qmuparser/qmutranslation.cpp b/src/libs/qmuparser/qmutranslation.cpp index dc1097343..01b642ecd 100644 --- a/src/libs/qmuparser/qmutranslation.cpp +++ b/src/libs/qmuparser/qmutranslation.cpp @@ -30,8 +30,8 @@ namespace qmu { //--------------------------------------------------------------------------------------------------------------------- -QmuTranslation QmuTranslation::translate(const QString &context, const QString &sourceText, - const QString &disambiguation, int n) +QmuTranslation QmuTranslation::translate(const char *context, const char *sourceText, + const char *disambiguation, int n) { if (n < 0) { diff --git a/src/libs/qmuparser/qmutranslation.h b/src/libs/qmuparser/qmutranslation.h index a3d7e259b..4b5106a5f 100644 --- a/src/libs/qmuparser/qmutranslation.h +++ b/src/libs/qmuparser/qmutranslation.h @@ -54,13 +54,13 @@ class QMUPARSERSHARED_EXPORT QmuTranslation public: 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); QmuTranslation &operator=(const QmuTranslation &tr); QmuTranslation(const QmuTranslation &tr); QString translate(const QString &locale) const; - static QmuTranslation translate(const QString &context, const QString &sourceText, - const QString &disambiguation = nullptr, int n = -1); + static QmuTranslation translate(const char * context, const char * sourceText, + const char * disambiguation = nullptr, int n = -1); QString getMcontext() const; QString getMsourceText() const; QString getMdisambiguation() const;