aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickloader/tst_qquickloader.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-10-11 16:01:30 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-10-11 16:01:30 +0300
commit105e610548a62d943301153afb337a49f14e9e25 (patch)
tree34d8e322f1161f4a8eafabdbc721af42ea960075 /tests/auto/quick/qquickloader/tst_qquickloader.cpp
parent960a980dc885622cb84990c4da75d5060318302d (diff)
parent94fd52dbb83a4982e4a70e621f431b0bd0945b5d (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.12' into tqtc/lts-5.15-opensourcev5.15.12-lts-lgpl
Diffstat (limited to 'tests/auto/quick/qquickloader/tst_qquickloader.cpp')
-rw-r--r--tests/auto/quick/qquickloader/tst_qquickloader.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp
index db678ae5a1..4539a89cb3 100644
--- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp
+++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp
@@ -134,6 +134,8 @@ private slots:
void setSourceAndCheckStatus();
void asyncLoaderRace();
void noEngine();
+
+ void stackOverflow();
};
Q_DECLARE_METATYPE(QList<QQmlError>)
@@ -1530,6 +1532,17 @@ void tst_QQuickLoader::noEngine()
QTRY_COMPARE(o->property("changes").toInt(), 1);
}
+void tst_QQuickLoader::stackOverflow()
+{
+ QQmlEngine engine;
+ const QUrl url = testFileUrl("overflow.qml");
+ QQmlComponent component(&engine, url);
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
+ const QString message = url.toString() + QStringLiteral(": Maximum call stack size exceeded.");
+ QTest::ignoreMessage(QtCriticalMsg, qPrintable(message));
+ QScopedPointer<QObject> o(component.create());
+}
+
QTEST_MAIN(tst_QQuickLoader)
#include "tst_qquickloader.moc"