aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-09-12 08:12:58 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-09-12 08:12:58 +0200
commitd77218522eb480c8d528de18049cd7b604cdeb2a (patch)
treea6433a8e9205a95006eae10b53285a0e3487423d /tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
parent589c8445e2623ef8e0b8294d7c558a2948b2a5e3 (diff)
parentd5686fa2ac2248d5a31237573fa08697f18f035f (diff)
Merge branch 'master' into refactor
Conflicts: examples/declarative/cppextensions/qwidgets/qwidgets.pro examples/declarative/minehunt/main.cpp examples/declarative/minehunt/minehunt.pro src/declarative/items/context2d/qsgcontext2d.cpp src/declarative/items/qsgflickable.cpp src/declarative/items/qsgtextedit.cpp src/declarative/items/qsgtextinput.cpp src/declarative/particles/qsgangleddirection.cpp src/declarative/particles/qsgcumulativedirection.cpp src/declarative/particles/qsgcumulativedirection_p.h src/declarative/particles/qsgfollowemitter.cpp src/declarative/particles/qsgmodelparticle.cpp src/declarative/particles/qsgparticlesystem.cpp src/qtquick1/util/qdeclarativeview.h tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsgfocusscope/tst_qsgfocusscope.cpp Change-Id: Ib4be2a5e742dee1a399d73da97161736f77448e5
Diffstat (limited to 'tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
index 5583701b12..966ac1950c 100644
--- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
+++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
@@ -61,6 +61,7 @@ private slots:
void count();
void crashBug();
+ void QTBUG_17868();
};
void tst_QDeclarativePropertyMap::insert()
@@ -218,6 +219,23 @@ void tst_QDeclarativePropertyMap::crashBug()
delete obj;
}
+void tst_QDeclarativePropertyMap::QTBUG_17868()
+{
+ QDeclarativePropertyMap map;
+
+ QDeclarativeEngine engine;
+ QDeclarativeContext context(&engine);
+ context.setContextProperty("map", &map);
+ map.insert("key", 1);
+ QDeclarativeComponent c(&engine);
+ c.setData("import QtQuick 2.0\nItem {property bool error:false; Component.onCompleted: {try{console.log(map.keys());}catch(e) {error=true;}}}",QUrl());
+ QObject *obj = c.create(&context);
+ QVERIFY(obj);
+ QVERIFY(!obj->property("error").toBool());
+ delete obj;
+
+}
+
QTEST_MAIN(tst_QDeclarativePropertyMap)
#include "tst_qdeclarativepropertymap.moc"