summaryrefslogtreecommitdiffstats
path: root/PySide/QtWebKit/typesystem_webkit.xml
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-03-23 13:31:35 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-03-25 09:57:02 -0300
commitc50d08e4c8cbe815a691df7d3fea201cef64d69e (patch)
treea67e5b0f8ede53e9a039f3d6ade2c94250ceb1f9 /PySide/QtWebKit/typesystem_webkit.xml
parent3cd2cad128f1d6f22a79fce1e97dde9e1f08485b (diff)
downloadpyside-c50d08e4c8cbe815a691df7d3fea201cef64d69e.tar.gz
pyside-c50d08e4c8cbe815a691df7d3fea201cef64d69e.tar.xz
pyside-c50d08e4c8cbe815a691df7d3fea201cef64d69e.zip
Fix bug 694 - "QWebPage::extensions need injected overloads due to required casts on C++ version"
Diffstat (limited to 'PySide/QtWebKit/typesystem_webkit.xml')
-rw-r--r--PySide/QtWebKit/typesystem_webkit.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/PySide/QtWebKit/typesystem_webkit.xml b/PySide/QtWebKit/typesystem_webkit.xml
index 1e63292..eb645c2 100644
--- a/PySide/QtWebKit/typesystem_webkit.xml
+++ b/PySide/QtWebKit/typesystem_webkit.xml
@@ -81,6 +81,29 @@
<value-type name="ExtensionOption" />
<value-type name="ExtensionReturn" />
+ <modify-function signature="extension(QWebPage::Extension, const QWebPage::ExtensionOption*, QWebPage::ExtensionReturn*)">
+ <modify-argument index="2" invalidate-after-use="yes">
+ <conversion-rule class="target">
+ PyObject* %out = 0;
+ // Cast the parameters according to the extension type
+ if (extension == QWebPage::ChooseMultipleFilesExtension)
+ %out = %CONVERTTOPYTHON[ChooseMultipleFilesExtensionOption*](reinterpret_cast&lt;const ChooseMultipleFilesExtensionOption*>(option));
+ else if (extension == QWebPage::ErrorPageExtension)
+ %out = %CONVERTTOPYTHON[ErrorPageExtensionOption*](reinterpret_cast&lt;const ErrorPageExtensionOption*>(option));
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="3" invalidate-after-use="yes">
+ <conversion-rule class="target">
+ PyObject* %out = 0;
+ // Cast the parameters according to the extension type
+ if (extension == QWebPage::ChooseMultipleFilesExtension)
+ %out = %CONVERTTOPYTHON[ChooseMultipleFilesExtensionReturn*](reinterpret_cast&lt;const ChooseMultipleFilesExtensionReturn*>(output));
+ else if (extension == QWebPage::ErrorPageExtension)
+ %out = %CONVERTTOPYTHON[ErrorPageExtensionReturn*](reinterpret_cast&lt;const ErrorPageExtensionReturn*>(output));
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+
<modify-function signature="setNetworkAccessManager(QNetworkAccessManager*)">
<modify-argument index="1">
<reference-count action="set"/>