summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@theqtcompany.com>2015-07-07 13:02:09 +0200
committerMilian Wolff <milian.wolff@kdab.com>2015-07-08 08:00:36 +0000
commit81449c0c804735b71ba2f225005482c7c0123dad (patch)
treee7a595d1b72f30190c408b3f69a1c6fc1f8bf3a1 /src
parentb401f4ab3e0bcbf0da781a8d78032752f11500ab (diff)
downloadqtwebchannel-81449c0c804735b71ba2f225005482c7c0123dad.tar.gz
Support subclass property getters and setters.
QDialog for instance adds a setter for the modal property already exposed by QWidget. Object.defineProperty requires configurable set to true in order to add that setter at a later stage. Adds some reusable autotest logic with a soft dependency on QJSEngine to test some of the C++/JS integration aspects. Task-number: QTBUG-46548 Change-Id: Ibd49274f7d334c068c4006fb09417abf911c24e9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/webchannel/qwebchannel.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/webchannel/qwebchannel.js b/src/webchannel/qwebchannel.js
index f114e77..d8c28bc 100644
--- a/src/webchannel/qwebchannel.js
+++ b/src/webchannel/qwebchannel.js
@@ -365,6 +365,7 @@ function QObject(name, data, webChannel)
}
Object.defineProperty(object, propertyName, {
+ configurable: true,
get: function () {
var propertyValue = object.__propertyCache__[propertyIndex];
if (propertyValue === undefined) {