summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJacek Całusiński <forger@forger.pl>2015-04-24 11:26:01 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-04-27 16:14:17 +0000
commit0635b1a69dd666f5eed4b096895bd80b1a9420ff (patch)
treeca27e1bf90db814103d5356bd33e38770b1418ee /tests
parent2886935f96e5f817ba3d4b62dbc78bd722123c1f (diff)
Moc: test if superclass list is not empty before accessing first()
Accessing QList().first() with an empty superclassList caused assertion fail. Added check to fix it. Change-Id: I1aff35e0d267fc0e670beadba1bd196b175a4da8 Co-authored-with: Olivier Goffart <ogoffart@woboq.com> Task-number: QTBUG-45790 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 08dc9581e1..00e5c60b29 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -83,6 +83,10 @@ QT_USE_NAMESPACE
template <bool b> struct QTBUG_31218 {};
struct QTBUG_31218_Derived : QTBUG_31218<-1<0> {};
+#if defined(Q_MOC_RUN)
+ class QTBUG_45790 : Bug() { };
+#endif
+
struct MyStruct {};
struct MyStruct2 {};