diff options
Diffstat (limited to 'tests/auto/qml')
-rw-r--r-- | tests/auto/qml/qml.pro | 11 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/qqmlecmascript.pro | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 |
4 files changed, 22 insertions, 5 deletions
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index d99d18c152..dc6c0def56 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -5,8 +5,6 @@ METATYPETESTS += \ PUBLICTESTS += \ parserstress \ - qjsengine \ - qjsvalue \ qjsvalueiterator \ qjsonbinding \ qmlmin \ @@ -50,6 +48,15 @@ PRIVATETESTS += \ qqmlbundle \ v4 +!contains(QT_CONFIG, no-widgets) { + PUBLICTESTS += \ + qjsengine \ + qjsvalue + + PRIVATETESTS += \ + qqmlecmascript +} + SUBDIRS += $$PUBLICTESTS SUBDIRS += $$METATYPETESTS SUBDIRS += debugger diff --git a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro index 42c7bd91de..8de609d9d6 100644 --- a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro +++ b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro @@ -16,4 +16,6 @@ include (../../shared/util.pri) TESTDATA = data/* -QT += core-private gui-private v8-private qml-private network widgets testlib +QT += core-private gui-private v8-private qml-private network testlib +!contains(QT_CONFIG, no-widgets): QT += widgets + diff --git a/tests/auto/qml/qqmlecmascript/testtypes.cpp b/tests/auto/qml/qqmlecmascript/testtypes.cpp index fba6cb36e8..8fd160513c 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.cpp +++ b/tests/auto/qml/qqmlecmascript/testtypes.cpp @@ -39,8 +39,10 @@ ** ****************************************************************************/ #include "testtypes.h" -#include <QWidget> -#include <QPlainTextEdit> +#ifndef QT_NO_WIDGETS +# include <QWidget> +# include <QPlainTextEdit> +#endif #include <QQmlEngine> #include <QJSEngine> #include <QThread> @@ -201,8 +203,10 @@ void registerTypes() // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 qmlRegisterType<MyRevisionedSubclass,1>("Qt.test",1,1,"MyRevisionedSubclass"); +#ifndef QT_NO_WIDGETS qmlRegisterExtendedType<QWidget,QWidgetDeclarativeUI>("Qt.test",1,0,"QWidget"); qmlRegisterType<QPlainTextEdit>("Qt.test",1,0,"QPlainTextEdit"); +#endif qRegisterMetaType<MyQmlObject::MyType>("MyQmlObject::MyType"); diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 45005e68c1..18743ac57d 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -190,7 +190,9 @@ private slots: void qtbug_21580(); void singleV8BindingDestroyedDuringEvaluation(); void bug1(); +#ifndef QT_NO_WIDGETS void bug2(); +#endif void dynamicCreationCrash(); void dynamicCreationOwnership(); void regExpBug(); @@ -2042,6 +2044,7 @@ void tst_qqmlecmascript::bug1() delete object; } +#ifndef QT_NO_WIDGETS void tst_qqmlecmascript::bug2() { QQmlComponent component(&engine); @@ -2052,6 +2055,7 @@ void tst_qqmlecmascript::bug2() delete object; } +#endif // Don't crash in createObject when the component has errors. void tst_qqmlecmascript::dynamicCreationCrash() |