On Thursday April 22 2004 13:46, Torsten Marek wrote:Since I got some spare time on my hands left (hopefully), I'll see if it's possible to fix this. If it is, I'll send you patches resp. the script for patching.
Jim Bublitz schrieb:
is it possible that it is impossible to build PyKDE using sip4
(latest snapshot)? I had to manually add some %Imports in the
<module>mod.sip.in (sip complained, for instance, "sip: The
kfile module must explicitly %Import the kdeui module"), but
then everything worked.
Yes - sip < 4.0 allowed recursive %Imports; 4.0 requires explicit %Imports. That *should* be the only major code change I think, but I haven't tested it yet (the other problems below are fairly easy to fix - just type errors).
When trying to compile it, I get the following output: g++ -c -pipe -fPIC -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I. -I../extra/kde322 -I/usr/include/kde -I/usr/include/python2.3 -I/usr/share/qt3/include -I/usr/X11R6/include -o sipdcoppart0.o sipdcoppart0.cpp sip/dcop/dcopobject.sip: In function `int convertTo_QPtrList_0200DCOPObject(PyObject*, void**, int*)': sip/dcop/dcopobject.sip:136: error: invalid conversion from `void*' to ` DCOPObject*' sip/dcop/dcopclient.sip: In function `int convertTo_QValueList_0200QCString(PyObject*, void**, int*)': sip/dcop/dcopclient.sip:215: error: invalid conversion from `void*' to ` QCString*' sipdcoppart0.cpp: In function `PyObject* meth_DCOPClient_connectDCOPSignal(PyObject*, PyObject*)': sipdcoppart0.cpp:6685: Warnung: `connectDCOPSignal' is deprecated (declared at /usr/include/kde/dcopclient.h:437) sipdcoppart0.cpp: In function `PyObject* meth_DCOPClient_disconnectDCOPSignal(PyObject*, PyObject*)': sipdcoppart0.cpp:6767: Warnung: `disconnectDCOPSignal' is deprecated (declared at /usr/include/kde/dcopclient.h:465) sipdcoppart0.cpp: In function `PyObject* meth_DCOPClient_dcopServerFileOld(PyObject*, PyObject*)': sipdcoppart0.cpp:7564: Warnung: `dcopServerFileOld' is deprecated (declared at /usr/include/kde/dcopclient.h:723) make[1]: *** [sipdcoppart0.o] Fehler 1
I doubt that this is connected to using sip4 instead of sip3, if I did something illegal, just ignore me...
The deprecation warnings are coming from KDE itself (from the h files) I would think. I haven't seen them on my compiles though. Right now I have that gcc feature effectively #defined out when I generate the sip files from KDE h files. If the methods were removed, I would be versioning them out, but since they're still valid (just deprecated) it seems to me I should leave them in. I'm not sure if supressing the warnings would be the right thing to do either, but I hate compiles that generate warnings.
I also don't get the type errors you have (using 3.10.1) - that may be due to differences in how sip 3.10.1 and sip 4.0 generate or use code. Most of the newer handwritten code (which is where the errors are occurring) should have the typecasts, but you can just add them:
sip/dcop/dcopobject.sip:136
cpp = (DCOPObject *)sipForceConvertTo_DCOPObject (elem, &iserr);
sip/dcop/dcopclient.sip:215
cpp = (QCString *)sipForceConvertTo_QCString (elem, &iserr);
and similarly for any other occurances. A quick grep turns up 38 files that *might* need casts added, basically on sipForceConvertTo_* calls. The cast will always be the same as the class name after the '_' in the function name, and always a pointer. Actually, it wouldn't be hard to write a Python script to fix it. There may be some other places where similar problems come up.
I'll be getting to sip 4.0 in a week or two, and I expect most of the changes needed to be similar to what you've found, so the conversion shouldn't take long. Most of the changes for 3.10.1 are 4.0 compatible, although I've probably missed a few. I'd like to finish the 3.10.1 version before getting into 4.0 stuff.
greetings
Torsten -- Torsten Marek <[EMAIL PROTECTED]> ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858 www.keyserver.net -- wwwkeys.eu.pgp.net
signature.asc
Description: OpenPGP digital signature
