Fix tst_qqmlecmascripts::importScripts with private imports
authorSimon Hausmann <simon.hausmann@digia.com>
Sun, 23 Jun 2013 13:08:13 +0000 (15:08 +0200)
committerLars Knoll <lars.knoll@digia.com>
Sun, 23 Jun 2013 19:38:12 +0000 (21:38 +0200)
commit6c7969462a6ede2850927bc3d0c77f7785f4663e
tree40ebd5ecc741e6ecc7f845a0dbfe3bcefecfb951
parent13d3954de41451536dfbd8c562a1a258cdc4cc71
Fix tst_qqmlecmascripts::importScripts with private imports

* In QQmlContextWrapper::get we must check the calling context before
  allowing the get, just like in the Getter() in qv8contextwrapper.cpp
* When trying to call a method on undefined/null, throw a readable error message,
  as expected by the test.

Change-Id: Ie39e8ae82a108deef264e4044e12e7b15959caf9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlcontextwrapper.cpp
src/qml/qml/v4/qv4runtime.cpp