The console.log() is not a significant part of the test, so it can be
removed. The exception will still be thrown if keys is not a function.
Change-Id: Ifaec6e0ed5ecc32ad7b885bff31df493120ed9aa
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
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());
+ c.setData("import QtQuick 2.0\nItem {property bool error:false; Component.onCompleted: {try{ map.keys(); }catch(e) {error=true;}}}",QUrl());
QObject *obj = c.create(&context);
QVERIFY(obj);
QVERIFY(!obj->property("error").toBool());