diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-04 18:45:18 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-12 20:58:41 +0100 |
commit | 843be43f18ecb007a0bb5fbb9034b8643a28b196 (patch) | |
tree | 107ee060136fdbf717cf9ca94f5e1deffd106901 /src/qmltest/quicktest.cpp | |
parent | 06ab8d790dfab32472bcc20736c7486bf43beeba (diff) |
Merge the QtTest and Qt.test.qtestroot QML modules
There is no point in having them separate and this way the plugin can be
optional.
Fixes: QTBUG-89804
Change-Id: Ic7de35f6ee7abde4840841e17d21c2b709f6db7d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r-- | src/qmltest/quicktest.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index 5962af8569..9085f96337 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -133,13 +133,6 @@ bool QQuickTest::qWaitForItemPolished(const QQuickItem *item, int timeout) return QTest::qWaitFor([&]() { return !QQuickItemPrivate::get(item)->polishScheduled; }, timeout); } -static QObject *testRootObject(QQmlEngine *engine, QJSEngine *jsEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(jsEngine); - return QTestRootObject::instance(); -} - static inline QString stripQuotes(const QString &s) { if (s.length() >= 2 && s.startsWith(QLatin1Char('"')) && s.endsWith(QLatin1Char('"'))) @@ -534,9 +527,6 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch qputenv("QT_QTESTLIB_RUNNING", "1"); - // Register the custom factory function - qmlRegisterSingletonType<QTestRootObject>("Qt.test.qtestroot", 1, 0, "QTestRootObject", testRootObject); - QSet<QString> commandLineTestFunctions(QTest::testFunctions.cbegin(), QTest::testFunctions.cend()); const bool filteringTestFunctions = !commandLineTestFunctions.isEmpty(); @@ -594,7 +584,7 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch QObject::connect(view.engine(), SIGNAL(quit()), &eventLoop, SLOT(quit())); view.rootContext()->setContextProperty - (QLatin1String("qtest"), QTestRootObject::instance()); // Deprecated. Use QTestRootObject from Qt.test.qtestroot instead + (QLatin1String("qtest"), QTestRootObject::instance()); // Deprecated. Use QTestRootObject from QtTest instead view.setObjectName(fi.baseName()); view.setTitle(view.objectName()); |