diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-29 03:47:45 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-29 03:49:35 (GMT) |
commit | e011539844e6702e02770362a95d9b969643a9df (patch) | |
tree | fe5d4650b7f934cd846f76255fb4db22a938f98d /tests/auto/declarative/qdeclarativepropertymap | |
parent | 593f551d6718343f80b5497de58eb80566ea7908 (diff) | |
download | Qt-e011539844e6702e02770362a95d9b969643a9df.zip Qt-e011539844e6702e02770362a95d9b969643a9df.tar.gz Qt-e011539844e6702e02770362a95d9b969643a9df.tar.bz2 |
Fix crash in QDeclarativePropertyMap.
Task-number: QTBUG-9439
Diffstat (limited to 'tests/auto/declarative/qdeclarativepropertymap')
-rw-r--r-- | tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp | 16 |
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" |