[PyKDE] PyKDE 4.0.0 and gcc295 (on older FreeBSD branch)
Jim Bublitz
jbublitz at nwinternet.com
Mon Mar 7 04:46:40 GMT 2005
On Sunday 06 March 2005 17:38, Danny Pansters wrote:
> Hi,
>
> I attempt to maintain the FreeBSD port to sip, py-qt, py-kde, and have just
> updated the former two to their .1 versions, currently checking if py-kde
> still builds (latest snapshot).
>
> I have a few observations (small fixable things) and one problem (maybe a
> bug).
>
> First, some of the examples/templates break, they need to be updated. For
> example the systray examples need something like KIcon.MainToolbar in its
> loadIcon () call, rather than 0 and it should import KIcon. The other one,
> which I didn't look into more closely is the qxembed stuff.
The qxembed example should be fixed in the latest snapshot, unless I missed
something. I'll check it again - might have gotten messed up with version
control. I missed the enum in the systray example, so I'll check that out.
I'll go through the templates too.
> First-and-a-half, the templates/annotated don't seem to work,
> templates/basic. What's the idea of annotated vs basic? And related, should
> the templates be installed (I do so as a subdir of
> /usr/local/share/examples/py24-kde/ ATM).
The basic/ directory is the annotated/ stuff without all of the comments. That
install location sounds find to me if it's findable by users. I use them to
start off programs, and the comments are annoying, but hopefully they're
helpful to newbies.
> Second (the problem), on FreeBSD 5.X (system compiler gcc-3.4) it only
> throws warnings like this:
>
> /usr/X11R6/include/qptrlist.h: In member function `void
> QPtrList<type>::deleteItem(void*) [with type = KIconThemeDir]':
> sipkdecorepart0.cpp:114831: instantiated from here
> /usr/X11R6/include/qptrlist.h:150: warning: possible problem detected in
> invocation of delete operator:
> /usr/X11R6/include/qptrlist.h:150: warning: invalid use of undefined type
> `struct KIconThemeDir'
> ../extra/kde332/kicontheme.h:23: warning: forward declaration of `struct
> KIconThemeDir'
> /usr/X11R6/include/qptrlist.h:150: note: neither the destructor nor the
> class-specific operator delete will be called, even if they are declared
> when the classis defined.
>
> But on FreeBSD 4.X (system compiler gcc-2.95) I've been told it croaks like
> this:
>
> /usr/X11R6/include/qptrlist.h: In method `void
> QPtrList<KIconThemeDir>::deleteItem(void *)':
> /usr/include/g++/stl_map.h:76: instantiated from here
> /usr/X11R6/include/qptrlist.h:150: invalid use of undefined type `class
> KIconThemeDir'
> ../extra/kde332/kicontheme.h:23: forward declaration of `class
> KIconThemeDir' *** Error code 1
> Any idea how to solve this? It seems that the class KIconThemeDir shouldn't
> really be used (anymore?) but instead KIconTheme::dir() but it's declared
> in kicontheme.h. This is KDE 3.3.2.
The problem with KIconThemeDir is that it's a forward declaration of a class
that's defined in the cpp file. sip doesn't use the cpp files when compiling,
and I've yet to find a way to get sip to ignore this. The fix is to provide a
kicontheme.h that doesn't forward declare the class, and that's what's
supposed to be in extra/kde332. It's private, so Python users can't access it
anyway.
Unfortunately, I just copied the file over and forgot to modify it - just
comment out the two lines that refer to KIconThemeDir in that h file (or copy
the kicontheme.h file from extra/kde330 -- /kde331 is wrong too). My
systems don't have a problem with it any more, so I tend to miss it unless
other people notify me.
Lastly, run importTest.py (top level directory) with the gcc-3.4 compiled
version. I don't have gcc-3.4 and there are some reports of problems. If
there's a problem, some of the modules won't import.
I'll get the fixes above into the next snapshot, which will be available in a
day or two. If Phil is away, it won't get posted to the riverbankcomputing
site immediately, so let me know if you want me to mail it to you. It's about
1.2MB uuencoded for mail.
Thanks for the feedback!
Jim
More information about the PyQt
mailing list