QmlJSTools: Test: Fix used qml file

Former welcomescreen.qml is gone. Use another qml file to perform
the test.

Change-Id: Ibb6a143eab96202e152c799dc394a305f9db405d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-04-19 11:07:15 +02:00
committed by David Schulz
parent 078b8bbf4d
commit 45a5f47e01

View File

@@ -43,12 +43,12 @@ void QmlJSToolsPlugin::test_basic()
{
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
const QString welcomescreenRootPath = Core::ICore::resourcePath() + QLatin1String("/welcomescreen/welcomescreen.qml");
modelManager->updateSourceFiles(QStringList(welcomescreenRootPath), false);
const QString qmlFilePath = Core::ICore::resourcePath() + QLatin1String("/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml");
modelManager->updateSourceFiles(QStringList(qmlFilePath), false);
modelManager->joinAllThreads();
Snapshot snapshot = modelManager->snapshot();
Document::Ptr doc = snapshot.document(welcomescreenRootPath);
Document::Ptr doc = snapshot.document(qmlFilePath);
QVERIFY(doc && doc->isQmlDocument());
ContextPtr context = Link(snapshot, ViewerContext(), LibraryInfo())();