Error with KPassivePopup and OS X compiles

Lubos Lunak l.lunak at suse.cz
Mon Jan 30 10:58:35 GMT 2006


On Monday 30 January 2006 03:11, Tanner Lovelace wrote:
> Greetings,
>
> In trying to get kdelibs compiled under OS X, some of us have run into a
> problem with KPassivePopup.  It appears that while under Qt/X11, the type
> "WId" is defined as
>
> typedef unsigned long WId
>
> under Qt/Mac, it is instead defined as
>
> typedef int WId.
>
> This causes problems with the following two KPassivePopup constructors:
>
> KPassivePopup( WId parent );
> KPassivePopup( int popupStyle, QWidget *parent=0, Qt::WFlags f=0 );
>
> as the compiler cannot resolve which constructor should be called.

 Nice oversight.

> Can anyone suggest a course of action here?  How many times is the
> KPassivePopup constructor called?  This could be resolved just by removing
> the default argument for QWidget* in the second constructor, but that might
> be a huge job to change all the instances that call it if there are
> lots of them.

 We can't do anything about it for 3.5 because of binary compatibility, so 
there the only fix can be altering the calls so that they're not ambiguous.

 IMHO for KDE4 the solution should be moving KPassivePopup from kdeui to 
knotify as I don't see why any app should need to use it directly.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kde-core-devel mailing list