Jim Bublitz schrieb:
On Saturday April 24 2004 11:27, Torsten Marek wrote:

Hello Jim,


I spend my afternoon and I finally got dcop and kdecore to
compile for now. The issues are:


- missing casts (can be solved by little script, as you
proposed, actually, I used sed)


- missing include of fixx11h.h
        It just does not get included. If I add it in TypeHeaderCode
of fixx11h.sip, it will be included before the X includes,
which makes it useless. Temporary workaround for kdecore: add
#undef Unsorted
to sipqtQDir.h


fixx11.sip is empty right now, probably because of some #defines or #undefs I didn't do. You can add the #undef in the TypeHeaderCode block too if that helps, or add a modified fixx11.h to the extra/kde32* directories - fixx11 is on my list of things to look at anyway.

However, as far as I can tell, nothing else in kdelibs depends on fixx11.h - I didn't worry about the empty sip file, because it wasn't supposed to be in PyKDE in the first place. It's ignored when I select files now, but because there was a sip file created that I didn't delete, it gets copied into a new release automatically - treated as an obsolete or legacy file. It shouldn't be generating any code.

Do you know of a reason it's needed in PyKDE?
Yes, QDir does need it. The enum Sortspec contains an entry "Unsorted"
(l. 80 in qdir.h from qt 3.2.3).
X.h (from XFree86 4.3.0) also defines Unsorted, at least on Debian:
/* SetClipRectangles ordering */

#define Unsorted                0
#define YSorted                 1
#define YXSorted                2
#define YXBanded                3

I needed a lot of time to figure out why g++ refused to compile, error message was "Error while parsing numeric constant", until I looked into the cpp output, where
Unsorted = 0x03,
was preprocessed to
0 = 0x03,



- sip4 can't handle return types which are references to
complex types with abstract functions
        This is the case for KShortcutList::shortcut(int) and
::defaultShortcut(int). Both return "const KShortcut&". If
:: circumvented
this issue by removing
if(!meth)
        return *new const KShortcut&();
from both virtual handlers in sipKShortcutList. But to
actually solve this issue, we need Phil's assistance.


KShortcut isn't abstract, I don't think. Not sure what's going on here.
Sorry, I was not clear enough. The problem are the following to functions of KShortcutList:

    virtual const KShortcut& shortcut (uint) const = 0;
    virtual const KShortcut& shortcutDefault (uint) const = 0;

They are abstract, thus sipKShortcutList::shortcut(...) and KShortcutList::shortcutDefault(...) try to create a new instance of KShortcut if no Python method is defined, since they cannot call a class method in KShortcutList. The problem is that they create it with
if(!meth)
return *new const KShortcut&();
which fails to compile, it complains that it is not possible to create a simple type with new.
The affedted lines are 51336 and 51351 in sipkdecorepart0.cpp generated by sip4.



- there was %MemberCode somewhere in the .sips - just changed
it to %MethodCode.


The only one I found is in kio/kurifilter.sip. Shouldn't have missed it, but it's an easy fix (next alpha release). I might have copied over an old file from a previous version.
Yes, it was this one.


configure.py runs fine.


So what we need is a solution for the fixx11h.h and the
abstract method return types.
I checked and I was able to import kdecore, but I did not run
any intensive tests, and the example scripts all another
module.


Thanks - this is really helpful.

I'm glad I can help!

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


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to