forked from qt-creator/qt-creator
QmlPreview: fix use an init language
Change-Id: I2d2774d88a237871eaddacd18c55490e9bd953ef Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qmldebug/qmldebugcommandlinearguments.h>
|
||||
#include <qmlprojectmanager/qmlmultilanguageaspect.h>
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
@@ -110,9 +111,10 @@ QmlPreviewRunner::QmlPreviewRunner(RunControl *runControl, const QmlPreviewRunne
|
||||
this, [this, settings]() {
|
||||
if (settings.zoomFactor > 0)
|
||||
emit zoom(settings.zoomFactor);
|
||||
if (!settings.language.isEmpty())
|
||||
emit language(settings.language);
|
||||
|
||||
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current()) {
|
||||
if (!multiLanguageAspect->currentLocale().isEmpty())
|
||||
emit language(multiLanguageAspect->currentLocale());
|
||||
}
|
||||
emit ready();
|
||||
});
|
||||
|
||||
|
@@ -15,7 +15,6 @@ struct QmlPreviewRunnerSetting
|
||||
QmlPreviewFileClassifier fileClassifier;
|
||||
QmlPreviewFpsHandler fpsHandler;
|
||||
float zoomFactor = -1.0;
|
||||
QString language;
|
||||
QmlDebugTranslationClientFactoryFunction createDebugTranslationClientMethod;
|
||||
QmlPreviewRefreshTranslationFunction refreshTranslationsFunction;
|
||||
};
|
||||
|
Reference in New Issue
Block a user