[Kde-bindings] Response to "Anyone interested in helping me get KAction and KXMLGUI working?"

Gary Greene greeneg at tolharadys.net
Wed Jun 11 03:44:00 UTC 2008


On Tuesday 10 June 2008 02:25:53 am Richard Dale wrote:
> On Tuesday 10 June 2008 07:21:32 Gary Greene wrote:
> > Note, this is for KDE3:
> > After doing some work investigating the cause of KAction and KXMLGUI
> > working, I think I've hit on why it doesn't seem to work. As an
> > expermiment I tried intraspecting the actionCollection stored by
> > KMainWindow to see if it was unable to hold KActions or if it was unable
> > to return anything to the KXMLGUIClient provided by KMainWindow.
> >
> > It seems that the main problem is that PerlKDE doesn't implement binding
> > KActionPtrList based off the output from the actions method in
> > KActionCollection. The code that exhibits this is attached.
>
> I looked at the PerlQt 3.008 sources and it looks like you just need to add
> a macro call to the kde marshalling handlers, something like this:
>
> MARSHALL_QPTRLIST( KActionPtrList , KActionPtrList , KAction, "
> KDE::Action", FALSE )
>
> -- Richard

After adding the attached patch, I get the following error during compilation 
time of PerlQt:

g++ -c  -I/opt/kde3/include -I/usr/include -I/srv/foremand/RPM/BUILD/PerlQt-3.009/PerlKDE -I/srv/foremand/RPM/BUILD/PerlQt-3.009/smoke -I/srv/foremand/RPM/BUILD/PerlQt-3.009/PerlQt -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=pentiumpro -fasynchronous-unwind-tables   -DVERSION=\"3.009\" -DXS_VERSION=\"3.009\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE"  -Wnon-virtual-dtor -Wno-long-long -Wundef -W -Wpointer-arith -O2 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -fno-exceptions -fno-check-new -fno-common 
kde_handlers.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid 
for C/ObjC but not for C++
/srv/foremand/RPM/BUILD/PerlQt-3.009/PerlQt/handlers.cpp:193: warning: missing 
initializer for member 'mgvtbl::svt_copy'
/srv/foremand/RPM/BUILD/PerlQt-3.009/PerlQt/handlers.cpp:193: warning: missing 
initializer for member 'mgvtbl::svt_dup'
kde_handlers.cpp: In function 'void marshall_KCmdLineOptions(Marshall*)':
kde_handlers.cpp:118: warning: comparison between signed and unsigned integer 
expressions
kde_handlers.cpp: In function 'void marshall_KActionPtrList(Marshall*)':
kde_handlers.cpp:189: error: 'class QValueList<KAction*>' has no member 
named 'next'
kde_handlers.cpp:189: error: 'class QValueList<KAction*>' has no member 
named 'next'
/opt/kde3/include/qptrlist.h: In member function 'void 
QPtrList<type>::deleteItem(void*) [with type = KConfigBackEnd]':
kde_handlers.cpp:210:   instantiated from here
/opt/kde3/include/qptrlist.h:150: warning: possible problem detected in 
invocation of delete operator:
/opt/kde3/include/qptrlist.h:150: warning: invalid use of undefined 
type 'struct KConfigBackEnd'
/opt/kde3/include/kconfigbase.h:38: warning: forward declaration of 'struct 
KConfigBackEnd'
/opt/kde3/include/qptrlist.h:150: note: neither the destructor nor the 
class-specific operator delete will be called, even if they are declared when 
the class is defined.
make[2]: *** [kde_handlers.o] Error 1
make[2]: Leaving directory `/srv/foremand/RPM/BUILD/PerlQt-3.009/PerlKDE'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/srv/foremand/RPM/BUILD/PerlQt-3.009'
make: *** [all] Error 2

I've checked the header for QPtrList, and it does define a *next() member at 
line 111 of qptrlist.h from Qt 3.3.8 with the following declaration:

    type *next()            { return (type *)QGList::next(); }

Ideas are welcome.

-- 
Gary L. Greene, Jr.
Sent from: peorth
 20:37:24 up 1 day, 12:27,  9 users,  load average: 0.00, 0.05, 0.12
==========================================================================
Developer and Project Lead for the AltimatOS open source project
Volunteer Developer for the KDE open source project
See http://www.altimatos.com/ and http://www.kde.org/ for more information
==========================================================================

Please avoid sending me Word or PowerPoint attachments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PerlQt-3.009-kaction-marshall.patch
Type: text/x-diff
Size: 783 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080610/2cb45712/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080610/2cb45712/attachment.sig>


More information about the Kde-bindings mailing list