summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-03-24 05:20:16 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-03-24 05:25:44 (GMT)
commitf59619a3a4de074d0557ce17f9580a242e4e6c16 (patch)
tree72522f9be4633d019ec5ebdf0ea23c6b16be48f9
parent929488ba788549a9b38c1ab3784307b575a537a5 (diff)
downloadQt-f59619a3a4de074d0557ce17f9580a242e4e6c16.zip
Qt-f59619a3a4de074d0557ce17f9580a242e4e6c16.tar.gz
Qt-f59619a3a4de074d0557ce17f9580a242e4e6c16.tar.bz2
Fix abort in flipable
Flipable was calling updateSceneTransformFromParent, but this can only called when the the parent's scene transform is guaranteed to be updated, which is not the case in flipable. Task-number: QTBUG-8474 Reviewed-by: bnilsen
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp15
2 files changed, 14 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 8b46039..0e2ae63 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -160,7 +160,7 @@ QDeclarativeFlipable::Side QDeclarativeFlipable::side() const
{
Q_D(const QDeclarativeFlipable);
if (d->dirtySceneTransform)
- const_cast<QDeclarativeFlipablePrivate *>(d)->updateSceneTransformFromParent();
+ const_cast<QDeclarativeFlipablePrivate *>(d)->ensureSceneTransform();
return d->current;
}
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index 04c6710..4beee9a 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -58,7 +58,10 @@ private slots:
void create();
void checkFrontAndBack();
void setFrontAndBack();
- void crash();
+
+ // below here task issues
+ void QTBUG_9161_crash();
+ void QTBUG_8474_qgv_abort();
private:
QDeclarativeEngine engine;
@@ -110,7 +113,7 @@ void tst_qdeclarativeflipable::setFrontAndBack()
delete obj;
}
-void tst_qdeclarativeflipable::crash()
+void tst_qdeclarativeflipable::QTBUG_9161_crash()
{
QDeclarativeView *canvas = new QDeclarativeView;
canvas->setSource(QUrl(SRCDIR "/data/crash.qml"));
@@ -118,6 +121,14 @@ void tst_qdeclarativeflipable::crash()
delete canvas;
}
+void tst_qdeclarativeflipable::QTBUG_8474_qgv_abort()
+{
+ QDeclarativeView *canvas = new QDeclarativeView;
+ canvas->setSource(QUrl(SRCDIR "/data/flipable-abort.qml"));
+ canvas->show();
+ delete canvas;
+}
+
QTEST_MAIN(tst_qdeclarativeflipable)
#include "tst_qdeclarativeflipable.moc"