From 1c6cacf3020c0c201cd484ba165126123046e53b Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 16 Nov 2017 13:56:13 +0100 Subject: Remove extra profile from quicktestbrowser Quicktestbrowser had two different profiles with the same property name. Remove the unnecessary one to fix several bugs. Change-Id: I62a4722b8dab3c6a0132234badb2c2576efb6c60 Reviewed-by: Allan Sandfeld Jensen --- tests/quicktestbrowser/main.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/quicktestbrowser/main.cpp b/tests/quicktestbrowser/main.cpp index 65cb81821..3f513f6a6 100644 --- a/tests/quicktestbrowser/main.cpp +++ b/tests/quicktestbrowser/main.cpp @@ -70,17 +70,7 @@ int main(int argc, char **argv) Utils utils; appEngine.rootContext()->setContextProperty("utils", &utils); appEngine.load(QUrl("qrc:/ApplicationRoot.qml")); - QObject *rootObject = appEngine.rootObjects().first(); - - QQuickWebEngineProfile *profile = new QQuickWebEngineProfile(rootObject); - - const QMetaObject *rootMeta = rootObject->metaObject(); - int index = rootMeta->indexOfProperty("testProfile"); - Q_ASSERT(index != -1); - QMetaProperty profileProperty = rootMeta->property(index); - profileProperty.write(rootObject, qVariantFromValue(profile)); - - QMetaObject::invokeMethod(rootObject, "load", Q_ARG(QVariant, startupUrl())); + QMetaObject::invokeMethod(appEngine.rootObjects().first(), "load", Q_ARG(QVariant, startupUrl())); return app.exec(); } -- cgit v1.2.3