summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-18 23:50:52 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-21 23:04:58 (GMT)
commit44b1fc2051df2bfd784ce847ee430edad68e3dbd (patch)
tree86dd7abd1fb0d3aedb6e2caa242167d00b3203de /tests
parent83f6232cadb5bfeeeec170bb17224c4032031dd7 (diff)
downloadQt-44b1fc2051df2bfd784ce847ee430edad68e3dbd.zip
Qt-44b1fc2051df2bfd784ce847ee430edad68e3dbd.tar.gz
Qt-44b1fc2051df2bfd784ce847ee430edad68e3dbd.tar.bz2
Fix Flipable crash.
Task-number: QTBUG-9161
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/crash.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp10
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/crash.qml b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
new file mode 100644
index 0000000..ad40bf0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Flipable {
+ transform: Rotation {
+ axis.y: 1
+ axis.z: 0
+ angle: 180
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index ed37c43..04c6710 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -41,6 +41,7 @@
#include <qtest.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
#include <private/qdeclarativeflipable_p.h>
#include <private/qdeclarativevaluetype_p.h>
#include <QFontMetrics>
@@ -57,6 +58,7 @@ private slots:
void create();
void checkFrontAndBack();
void setFrontAndBack();
+ void crash();
private:
QDeclarativeEngine engine;
@@ -108,6 +110,14 @@ void tst_qdeclarativeflipable::setFrontAndBack()
delete obj;
}
+void tst_qdeclarativeflipable::crash()
+{
+ QDeclarativeView *canvas = new QDeclarativeView;
+ canvas->setSource(QUrl(SRCDIR "/data/crash.qml"));
+ canvas->show();
+ delete canvas;
+}
+
QTEST_MAIN(tst_qdeclarativeflipable)
#include "tst_qdeclarativeflipable.moc"