Farewell KAccel, you have served us well

Hamish Rodda rodda at kde.org
Sat Apr 1 03:06:44 BST 2006


On Saturday 01 April 2006 02:41, Benjamin Reed wrote:
> On 3/27/06, Hamish Rodda <rodda at kde.org> wrote:
> > Now that QAction has taken over the shortcut management, it is time to
> > remove KAccel from kdelibs.
>
> judging by the amount of KAccel stuff that changed in trunk, I take it
> this has been committed now?
>
> I'm running into issues with Qt/Mac in that kdeui/kglobalaccel has not
> excised all the X11 bits, it looks like:
>
> ---(snip!)---
> Building CXX object kdeui/CMakeFiles/kdeui.dir/kglobalaccel_x11.o
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.h:67: error: 'XEvent'
> has not been declared
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.h:69: error: expected
> ',' or '...' before '*' token
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.h:69: error: ISO C++
> forbids declaration of 'XEvent' with no type
> /usr/include/X11/Xlib.h:510: error: conflicting declaration 'typedef
> struct _XDisplay Display'
> /Users/ranger/cvs/kdelibs/kdecore/kapplication.h:45: error: 'Display'
> has a previous declaration as 'typedef void Display'
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp: In member
> function 'bool KGlobalAccelImpl::grabKey(int, bool)':
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:125: error:
> incomplete type 'QX11Info' used in nested name specifier
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:126: error:
> incomplete type 'QX11Info' used in nested name specifier
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:128: error:
> incomplete type 'QX11Info' used in nested name specifier
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:128: error:
> incomplete type 'QX11Info' used in nested name specifier
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp: At global scope:
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:146: error:
> prototype for 'bool KGlobalAccelImpl::x11Event(XEvent*)' does not
> match any in class 'KGlobalAccelImpl'
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.h:67: error:
> candidate is: virtual bool KGlobalAccelImpl::x11Event(int*)
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp: In member
> function 'bool KGlobalAccelImpl::x11Event(XEvent*)':
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:155: error:
> invalid conversion from 'XEvent*' to 'int'
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:155: error:
> initializing argument 1 of 'bool KGlobalAccelImpl::x11KeyPress(int)'
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp: At global scope:
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:178: error:
> prototype for 'bool KGlobalAccelImpl::x11KeyPress(const XEvent*)' does
> not match any in class 'KGlobalAccelImpl'
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.h:69: error:
> candidate is: bool KGlobalAccelImpl::x11KeyPress(int)
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp: In member
> function 'bool KGlobalAccelImpl::x11KeyPress(const XEvent*)':
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:182: error:
> incomplete type 'QX11Info' used in nested name specifier
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:183: error:
> incomplete type 'QX11Info' used in nested name specifier
> /Users/ranger/cvs/kdelibs/kdeui/kglobalaccel_x11.cpp:193: error:
> incomplete type 'QX11Info' used in nested name specifier
> make[2]: *** [kdeui/CMakeFiles/kdeui.dir/kglobalaccel_x11.o] Error 1
> make[1]: *** [kdeui/CMakeFiles/kdeui.dir/all] Error 2
> make: *** [all] Error 2
> ---(snip!)---
>
> I thought we had pure-qt-based implementations of accelerator stuff
> now; does there need to be a _mac implementation of this?  Or is this
> just vestiges of things that haven't been ported yet?

We're now as pure as we can be... Qt doesn't do global accelerators (as far as 
I can see).  If you look at kdecore/kglobalaccel_mac.h you'll see that nobody 
created an initial port for mac (same for windows, btw).

In order to make this work for mac, you'll need to provide a KGlobalAccelImpl 
designed for mac and use that in the build.  For now I can do the same thing 
as in kglobalaccel_mac.h for you if you like...

Cheers,

Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060401/165e05ca/attachment.sig>


More information about the kde-core-devel mailing list