From e9b959ed8ef5bab7840220675c327f6b0ffc3204 Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Fri, 26 Aug 2011 15:39:29 -0300 Subject: 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 Luciano Wolf --- PySide/QtWebKit/typesystem_webkit.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'PySide/QtWebKit') diff --git a/PySide/QtWebKit/typesystem_webkit.xml b/PySide/QtWebKit/typesystem_webkit.xml index bd32ccc49..5dbd449fa 100644 --- a/PySide/QtWebKit/typesystem_webkit.xml +++ b/PySide/QtWebKit/typesystem_webkit.xml @@ -163,6 +163,27 @@ + + + + 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); + } + } + + -- cgit v1.2.3