aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlengine/tst_qqmlengine.cpp')
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp7
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.");