diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-27 13:55:14 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-27 15:01:40 +0100 |
commit | b6143c08077c7d692fad9daa628f3ded8fa97f68 (patch) | |
tree | f9507f7cd7007c2931c638975d609ab52912ff3e /tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | |
parent | 997a68ce934eb78f1bf680e37ca1b10ee79f484f (diff) |
tst_qqmlengine: Don't rename the QObject QML type
Registering a plain QObject as singleton instance does interesting
things to following tests. This didn't break in the CI as the CI then
retries the failed tests in isolation, which works.
Change-Id: Ieaa898067cb470f3e90f6e9059fb4b4b3a42de00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlengine/tst_qqmlengine.cpp')
-rw-r--r-- | tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index ab4c083b65..cfbbd2a94c 100644 --- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -997,6 +997,11 @@ public: SomeQObjectClass() : QObject(nullptr){} }; +class Dayfly : public QObject +{ + Q_OBJECT +}; + void tst_qqmlengine::singletonInstance() { QQmlEngine engine; @@ -1115,7 +1120,7 @@ void tst_qqmlengine::singletonInstance() { // deleted object - auto dayfly = new QObject{}; + auto dayfly = new Dayfly{}; auto id = qmlRegisterSingletonInstance("Vanity", 1, 0, "Dayfly", dayfly); delete dayfly; QTest::ignoreMessage(QtMsgType::QtWarningMsg, "<Unknown File>: The registered singleton has already been deleted. Ensure that it outlives the engine."); |