diff options
Diffstat (limited to 'tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp')
-rw-r--r-- | tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp b/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp index 008dfb3..12e3a70 100644 --- a/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp +++ b/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp @@ -71,7 +71,8 @@ tst_qmlsystempalette::tst_qmlsystempalette() void tst_qmlsystempalette::activePalette() { QString componentStr = "import Qt 4.6\nSystemPalette { }"; - QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl("file://")); QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); QVERIFY(object != 0); @@ -99,7 +100,8 @@ void tst_qmlsystempalette::activePalette() void tst_qmlsystempalette::inactivePalette() { QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Inactive }"; - QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl("file://")); QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); QVERIFY(object != 0); @@ -128,7 +130,8 @@ void tst_qmlsystempalette::inactivePalette() void tst_qmlsystempalette::disabledPalette() { QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Disabled }"; - QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl("file://")); QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); QVERIFY(object != 0); @@ -157,7 +160,8 @@ void tst_qmlsystempalette::disabledPalette() void tst_qmlsystempalette::paletteChanged() { QString componentStr = "import Qt 4.6\nSystemPalette { }"; - QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl("file://")); QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); QVERIFY(object != 0); |