qmlprieview: fix that init language is the chosen one

* removes language feature from preview service
* it is handled by an extra DebugTranslationService until now
* Qt versions without that extra service can not preview
  languages anymore
* Introduce the use of QmlPreviewRunnerSetting. It makes it
  easier to add more properties in the future
* Language needs an extra handling because it needs
  the loadUrl to find existing languages. So we save
  the language to a m_scheduledInitLanguage and emit
  this after the loadFile call happend.

Change-Id: I7f4aec97f7b61d6b290f225282169da594eb9160
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenssen
2020-09-28 08:20:23 +02:00
parent ac0ae2f1eb
commit 9dda8af0b0
16 changed files with 91 additions and 130 deletions

View File

@@ -78,21 +78,6 @@ void QmlPreviewPluginTest::testZoomFactorProperty()
QCOMPARE(spy.count(), 2);
}
void QmlPreviewPluginTest::testLocaleProperty()
{
ExtensionSystem::IPlugin *plugin = getPlugin();
QVERIFY(plugin);
QSignalSpy spy(plugin, SIGNAL(localeChanged(QString)));
QCOMPARE(plugin->property("locale").toString(), QString());
plugin->setProperty("locale", "de_DE");
QCOMPARE(plugin->property("locale").toString(), QString("de_DE"));
plugin->setProperty("locale", "qt_QT");
QCOMPARE(plugin->property("locale").toString(), QString("qt_QT"));
QCOMPARE(spy.count(), 2);
}
void QmlPreviewPluginTest::testFpsHandlerProperty()
{
ExtensionSystem::IPlugin *plugin = getPlugin();