aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/translation/translation.h
diff options
context:
space:
mode:
authorEgor Nemtsev <enemtsev@luxoft.com>2019-02-08 12:53:38 +0300
committerBramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>2019-02-11 09:06:15 +0000
commit7e8ec0575afd2cc046d1ba7a2e7033c135b932b5 (patch)
tree580b8464de89e188eee7caf55e80f10b69348363 /plugins/translation/translation.h
parentf9262c38c4b06b24f138d699b667fe73668738aa (diff)
[utils] fix Config Translation binding loop warning on initialization
Change-Id: I6faec08704d82dcaeba8f69125a5b01a53c74952 Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
Diffstat (limited to 'plugins/translation/translation.h')
-rw-r--r--plugins/translation/translation.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/translation/translation.h b/plugins/translation/translation.h
index 4691fb3f..9863428e 100644
--- a/plugins/translation/translation.h
+++ b/plugins/translation/translation.h
@@ -43,11 +43,13 @@ class Translation : public QObject
Q_PROPERTY(QString languageLocale READ languageLocale WRITE setLanguageLocale NOTIFY languageLocaleChanged)
Q_PROPERTY(QStringList availableTranslations READ availableTranslations NOTIFY availableTranslationsChanged)
+ Q_PROPERTY(QUrl path READ path WRITE setPath NOTIFY pathChanged)
public:
explicit Translation(QObject *parent = nullptr);
- Q_INVOKABLE void setPath(const QUrl &languageFilePath);
+ void setPath(const QUrl &languageFilePath);
+ QUrl path();
void setLanguageLocale(const QString &languageLocale);
QString languageLocale() const;
@@ -59,12 +61,13 @@ public:
signals:
void languageLocaleChanged();
void availableTranslationsChanged();
+ void pathChanged();
private:
bool loadTranslationFile(const QString &langLocale);
QString m_languageLocale;
- QString m_languageFilePath;
+ QUrl m_languageFilePath;
QTranslator m_translator;