diff options
author | Liang Qi <liang.qi@nokia.com> | 2011-10-25 12:56:51 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2011-10-25 12:56:51 (GMT) |
commit | bd0258ed73ecee28fba4c21027b2c2afd1b6af39 (patch) | |
tree | 136e780c13e0019382a315758d20e8ea43cf1c2d /tests/auto/declarative | |
parent | cb4eb590d4af9978a0d60402f3c4ab99b6f4ede4 (diff) | |
parent | ec6543371108bbe24fb8d98eb1ff057c641a0e9d (diff) | |
download | Qt-bd0258ed73ecee28fba4c21027b2c2afd1b6af39.zip Qt-bd0258ed73ecee28fba4c21027b2c2afd1b6af39.tar.gz Qt-bd0258ed73ecee28fba4c21027b2c2afd1b6af39.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
src/corelib/kernel/qeventdispatcher_symbian.cpp
src/declarative/qml/qdeclarativetypeloader.cpp
src/imports/gestures/gestures.pro
src/imports/particles/particles.pro
src/opengl/qgl.cpp
src/opengl/qgl_p.h
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
tests/auto/qaudioinput/qaudioinput.pro
tests/auto/qaudiooutput/qaudiooutput.pro
tests/auto/qchar/qchar.pro
tests/auto/qclipboard/test/test.pro
tests/auto/qsound/qsound.pro
Diffstat (limited to 'tests/auto/declarative')
3 files changed, 45 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro index 2c13644..3bdb3fc 100644 --- a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro +++ b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro @@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativepincharea.cpp symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml new file mode 100644 index 0000000..ed1f22f --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml @@ -0,0 +1,27 @@ +import QtQuick 1.0 + +Rectangle { + id: myRect + width: 400 + height: 400 + + onHeightChanged: console.log("base state") + + states: [ + State { + name: "state1" + PropertyChanges { + target: myRect + onHeightChanged: console.log("state1") + color: "green" + } + }, + State { + name: "state2"; + PropertyChanges { + target: myRect + onHeightChanged: console.log("state2") + color: "red" + } + }] +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 9fafa7d..e90e6fb 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -113,6 +113,7 @@ private slots: void signalOverride(); void signalOverrideCrash(); void signalOverrideCrash2(); + void signalOverrideCrash3(); void parentChange(); void parentChangeErrors(); void anchorChanges(); @@ -520,6 +521,22 @@ void tst_qdeclarativestates::signalOverrideCrash2() delete rect; } +void tst_qdeclarativestates::signalOverrideCrash3() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash3.qml"); + QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create()); + QVERIFY(rect != 0); + + QDeclarativeItemPrivate::get(rect)->setState("state1"); + QDeclarativeItemPrivate::get(rect)->setState(""); + QDeclarativeItemPrivate::get(rect)->setState("state2"); + QDeclarativeItemPrivate::get(rect)->setState(""); + + delete rect; +} + void tst_qdeclarativestates::parentChange() { QDeclarativeEngine engine; |