summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-29 03:47:45 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-29 03:49:35 (GMT)
commite011539844e6702e02770362a95d9b969643a9df (patch)
treefe5d4650b7f934cd846f76255fb4db22a938f98d /tests
parent593f551d6718343f80b5497de58eb80566ea7908 (diff)
downloadQt-e011539844e6702e02770362a95d9b969643a9df.zip
Qt-e011539844e6702e02770362a95d9b969643a9df.tar.gz
Qt-e011539844e6702e02770362a95d9b969643a9df.tar.bz2
Fix crash in QDeclarativePropertyMap.
Task-number: QTBUG-9439
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
index d23de43..c996a14 100644
--- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
+++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
@@ -59,6 +59,8 @@ private slots:
void clear();
void changed();
void count();
+
+ void crashBug();
};
void tst_QDeclarativePropertyMap::insert()
@@ -168,6 +170,20 @@ void tst_QDeclarativePropertyMap::count()
QCOMPARE(map.size(), map.count());
}
+void tst_QDeclarativePropertyMap::crashBug()
+{
+ QDeclarativePropertyMap map;
+
+ QDeclarativeEngine engine;
+ QDeclarativeContext context(&engine);
+ context.setContextProperty("map", &map);
+
+ QDeclarativeComponent c(&engine);
+ c.setData("import Qt 4.6\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl());
+ QObject *obj = c.create(&context);
+ delete obj;
+}
+
QTEST_MAIN(tst_QDeclarativePropertyMap)
#include "tst_qdeclarativepropertymap.moc"