[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Incorrect code generated for signals in nested classes, patch included
From: Shaheed Haque <srhaque () theiet ! org>
Date: 2017-07-30 16:22:31
Message-ID: CAHAc2jeeyrfu+De=YDid_pKi-Wd+nPtLuL3bnq6GSKzn9YCmgQ () mail ! gmail ! com
[Download RAW message or body]
Hi,
The attached one-liner patch addresses an issue in 4.19.4.dev1707221302 where
namespace Solid
{
...
class Battery: Solid::DeviceInterface
{
...
Q_SIGNALS:
...
void chargeStateChanged(int newState, const QString &udi = QString());
ends up emitting code where sipCpp is declared like this:
Solid_Battery *sipCpp = reinterpret_cast<Solid_Battery *>(sipCppV);
instead of this:
Solid::Battery *sipCpp = reinterpret_cast<Solid::Battery *>(sipCppV);
The fix is to change the formatting code in the call to prcode:
=================
$ diff -U5 gencode.c.original gencode.c
--- gencode.c.original 2017-07-30 17:03:23.645851963 +0100
+++ gencode.c 2017-07-30 17:11:56.763179090 +0100
@@ -10509,11 +10509,11 @@
prcode(fp,
"static int emit_%L_%s(void *sipCppV, PyObject *sipArgs)\n"
"{\n"
" PyObject *sipParseErr = NULL;\n"
-" %C *sipCpp = reinterpret_cast<%C *>(sipCppV);\n"
+" %V *sipCpp = reinterpret_cast<%V *>(sipCppV);\n"
, cd->iff, od->cppname
, classFQCName(cd), classFQCName(cd));
}
/*
=================
Please consider applying.
Thanks, Shaheed
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic