summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-02 05:51:44 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-02 05:51:44 (GMT)
commitb0607f042af4ebad70ca821036bd3f2beff3955e (patch)
tree95bcd430b0a7a10bbe93643f410887f0793ea4ef
parent2501c66e3795040d72a1922499294a686832e7a2 (diff)
parent969daadd245153e8bb6c9a89a51565b83832f484 (diff)
downloadQt-b0607f042af4ebad70ca821036bd3f2beff3955e.zip
Qt-b0607f042af4ebad70ca821036bd3f2beff3955e.tar.gz
Qt-b0607f042af4ebad70ca821036bd3f2beff3955e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--src/declarative/util/qdeclarativestate.cpp4
-rw-r--r--src/s60installs/bwins/QtGuiu.def3
-rw-r--r--src/s60installs/eabi/QtGuiu.def3
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/extendsBug.qml26
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp16
5 files changed, 51 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 9f4cc39..f7dae10 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -358,8 +358,10 @@ QDeclarativeStatePrivate::generateActionList(QDeclarativeStateGroup *group) cons
if (!extends.isEmpty()) {
QList<QDeclarativeState *> states = group->states();
for (int ii = 0; ii < states.count(); ++ii)
- if (states.at(ii)->name() == extends)
+ if (states.at(ii)->name() == extends) {
+ qmlExecuteDeferred(states.at(ii));
applyList = static_cast<QDeclarativeStatePrivate*>(states.at(ii)->d_func())->generateActionList(group);
+ }
}
foreach(QDeclarativeStateOperation *op, operations)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 53ec18c..7844688 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12883,4 +12883,7 @@ EXPORTS
?focusScopeItemChange@QGraphicsItemPrivate@@UAEX_N@Z @ 12882 NONAME ; void QGraphicsItemPrivate::focusScopeItemChange(bool)
?setTimeout@QTapAndHoldGesture@@SAXH@Z @ 12883 NONAME ; void QTapAndHoldGesture::setTimeout(int)
?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@_N@Z @ 12884 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *, bool)
+ ?zScaleChanged@QGraphicsScale@@IAEXXZ @ 12885 NONAME ; void QGraphicsScale::zScaleChanged(void)
+ ?xScaleChanged@QGraphicsScale@@IAEXXZ @ 12886 NONAME ; void QGraphicsScale::xScaleChanged(void)
+ ?yScaleChanged@QGraphicsScale@@IAEXXZ @ 12887 NONAME ; void QGraphicsScale::yScaleChanged(void)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 559c896..a22b4d9 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -12088,4 +12088,7 @@ EXPORTS
_ZN18QTapAndHoldGesture7timeoutEv @ 12087 NONAME
_ZN20QGraphicsItemPrivate20focusScopeItemChangeEb @ 12088 NONAME
_ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12089 NONAME
+ _ZN14QGraphicsScale13xScaleChangedEv @ 12090 NONAME
+ _ZN14QGraphicsScale13yScaleChangedEv @ 12091 NONAME
+ _ZN14QGraphicsScale13zScaleChangedEv @ 12092 NONAME
diff --git a/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
new file mode 100644
index 0000000..a3c4827
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
@@ -0,0 +1,26 @@
+import Qt 4.7
+
+Rectangle {
+ width: 200
+ height: 200
+
+ Rectangle {
+ id: rect
+ objectName: "greenRect"
+ width: 100
+ height: 100
+ color: "green"
+ }
+
+ states:[
+ State {
+ name: "a"
+ PropertyChanges { target: rect; x: 100 }
+ },
+ State {
+ name: "b"
+ extend:"a"
+ PropertyChanges { target: rect; y: 100 }
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 3b6a420..6ae2759 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -139,6 +139,7 @@ private slots:
void urlResolution();
void unnamedWhen();
void returnToBase();
+ void extendsBug();
};
void tst_qdeclarativestates::initTestCase()
@@ -1186,6 +1187,21 @@ void tst_qdeclarativestates::returnToBase()
QCOMPARE(rect->property("stateString").toString(), QLatin1String("originalState"));
}
+//QTBUG-12559
+void tst_qdeclarativestates::extendsBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/extendsBug.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QDeclarativeRectangle *greenRect = rect->findChild<QDeclarativeRectangle*>("greenRect");
+
+ rectPrivate->setState("b");
+ QCOMPARE(greenRect->x(), qreal(100));
+ QCOMPARE(greenRect->y(), qreal(100));
+}
QTEST_MAIN(tst_qdeclarativestates)