summaryrefslogtreecommitdiffstats
path: root/tests/auto/moc/tst_moc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/moc/tst_moc.cpp')
-rw-r--r--tests/auto/moc/tst_moc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp
index d66791f..488f068 100644
--- a/tests/auto/moc/tst_moc.cpp
+++ b/tests/auto/moc/tst_moc.cpp
@@ -1157,6 +1157,13 @@ void tst_Moc::constructors()
QObject *o3 = mo->newInstance(Q_ARG(QString, str));
QVERIFY(o3 != 0);
QCOMPARE(qobject_cast<CtorTestClass*>(o3)->m_str, str);
+
+ {
+ //explicit constructor
+ QObject *o = QObject::staticMetaObject.newInstance();
+ QVERIFY(o);
+ delete o;
+ }
}
#include "task234909.h"