Fixed conversion rules for QWebPage.javaScriptPrompt method.
This commit is contained in:
parent
caec341176
commit
f9c9effbf7
1 changed files with 16 additions and 9 deletions
|
|
@ -141,20 +141,27 @@
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<modify-function signature="javaScriptPrompt(QWebFrame*,const QString &,const QString &,QString*)">
|
<modify-function signature="javaScriptPrompt(QWebFrame*,const QString &,const QString &,QString*)">
|
||||||
<modify-argument index="return">
|
|
||||||
<replace-type modified-type="PyObject"/>
|
|
||||||
</modify-argument>
|
|
||||||
<modify-argument index="4">
|
<modify-argument index="4">
|
||||||
<remove-argument />
|
<remove-argument />
|
||||||
|
<conversion-rule class="native">
|
||||||
|
QString _local;
|
||||||
|
QString* %4 = &_local;
|
||||||
|
</conversion-rule>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="(retval, result)"/>
|
<replace-type modified-type="PySequence"/>
|
||||||
|
<conversion-rule class="native">
|
||||||
|
Shiboken::AutoDecRef pyRes(PySequence_GetItem(%PYARG_0, 0));
|
||||||
|
Shiboken::AutoDecRef pyStr(PySequence_GetItem(%PYARG_0, 1));
|
||||||
|
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](pyRes);
|
||||||
|
*%4 = %CONVERTTOCPP[QString](pyStr);
|
||||||
|
</conversion-rule>
|
||||||
|
<conversion-rule class="target">
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](*%4));
|
||||||
|
</conversion-rule>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
|
||||||
QString str;
|
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, &str);
|
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, str);
|
|
||||||
</inject-code>
|
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QWebHistory"/>
|
<object-type name="QWebHistory"/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue