summaryrefslogtreecommitdiffstats
path: root/PySide/QtWebKit/typesystem_webkit.xml
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-08-26 15:39:29 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-08-26 17:17:46 -0300
commit804c3c5cadcf54e8e86e358239f19ea4587ba57c (patch)
tree32a0f21889e778108178bf3a840c8f6a9d01b11b /PySide/QtWebKit/typesystem_webkit.xml
parent94636bf3be50d5f46dc5928b3e5a920c1cf52888 (diff)
downloadpyside-804c3c5cadcf54e8e86e358239f19ea4587ba57c.tar.gz
pyside-804c3c5cadcf54e8e86e358239f19ea4587ba57c.tar.xz
pyside-804c3c5cadcf54e8e86e358239f19ea4587ba57c.zip
Implemented inject code for function QWebPage.qt_metacall.
This inject code is necessary due a workaround on C++ class QWebPage. Check de C++ doc for more information: http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#shouldInterruptJavaScript Fixes bug #973. Reviewed by: Hugo Parente <hugo.lima@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide/QtWebKit/typesystem_webkit.xml')
-rw-r--r--PySide/QtWebKit/typesystem_webkit.xml21
1 files changed, 21 insertions, 0 deletions
diff --git a/PySide/QtWebKit/typesystem_webkit.xml b/PySide/QtWebKit/typesystem_webkit.xml
index bd32ccc..5dbd449 100644
--- a/PySide/QtWebKit/typesystem_webkit.xml
+++ b/PySide/QtWebKit/typesystem_webkit.xml
@@ -163,6 +163,27 @@
</conversion-rule>
</modify-argument>
</modify-function>
+
+ <add-function signature="qt_metacall()">
+ <inject-code class="native">
+ static int _signalIndex = -1;
+ static QMetaMethod _m;
+
+ if (_signalIndex == -1) {
+ _signalIndex = QWebPage::staticMetaObject.indexOfSlot("shouldInterruptJavaScript()");
+ _m = QWebPage::staticMetaObject.method(_signalIndex);
+ }
+
+ if (_signalIndex == id) {
+ Shiboken::GilState gil;
+ PyObject* self = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(this);
+ if (self) {
+ Shiboken::AutoDecRef _pyMethod(PyObject_GetAttrString(self, "shouldInterruptJavaScript"));
+ return PySide::SignalManager::callPythonMetaMethod(_m, args, _pyMethod, false);
+ }
+ }
+ </inject-code>
+ </add-function>
</object-type>
<object-type name="QWebHistory"/>
<object-type name="QWebHistoryInterface"/>