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:
Tim Jenssen
2020-07-20 20:45:08 +02:00
parent 03307d8cb4
commit bde420f7b7
5 changed files with 24 additions and 21 deletions

View File

@@ -117,7 +117,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
if (m_multiLanguageAspect && m_multiLanguageAspect->value() && !m_multiLanguageAspect->databaseFilePath().isEmpty()) {
env.set("QT_MULTILANGUAGE_DATABASE", m_multiLanguageAspect->databaseFilePath().toString());
env.set("QT_MULTILANGUAGE_LANGUAGE", m_multiLanguageAspect->lastUsedLanguage());
env.set("QT_MULTILANGUAGE_LANGUAGE", m_multiLanguageAspect->currentLocale());
} else {
env.unset("QT_MULTILANGUAGE_DATABASE");
env.unset("QT_MULTILANGUAGE_LANGUAGE");