forked from qt-creator/qt-creator
qmlproject: rename lastUsedLanguage -> currentLocale
removed the connection from plugin to QmlMultiLanguageAspect::setCurrentLocale but calling it directly in QmlPreviewPlugin::setLocale Does not matter which method is called it will change the right thing only once because it is checking if it already have the set locale. Change-Id: I6cb4b115788adc103481dcda45e3214a0cd73401 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -40,7 +40,8 @@ public:
|
||||
explicit QmlMultiLanguageAspect(ProjectExplorer::Target *target);
|
||||
~QmlMultiLanguageAspect() override;
|
||||
|
||||
QString lastUsedLanguage() const;
|
||||
QString currentLocale() const;
|
||||
void setCurrentLocale(const QString &locale);
|
||||
Utils::FilePath databaseFilePath() const;
|
||||
void toMap(QVariantMap &map) const final;
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
@@ -49,13 +50,13 @@ public:
|
||||
static QmlMultiLanguageAspect *current(ProjectExplorer::Project *project);
|
||||
static QmlMultiLanguageAspect *current(ProjectExplorer::Target *target);
|
||||
|
||||
public slots:
|
||||
void setLastUsedLanguage(const QString &language);
|
||||
signals:
|
||||
void currentLocaleChanged(const QString &locale);
|
||||
|
||||
private:
|
||||
ProjectExplorer::Target *m_target = nullptr;
|
||||
mutable Utils::FilePath m_databaseFilePath;
|
||||
QString m_lastUsedLanguage;
|
||||
QString m_currentLocale;
|
||||
};
|
||||
|
||||
} // namespace QmlProjectManager
|
||||
|
||||
Reference in New Issue
Block a user