KAction subclass ctors lack KGuiItem/KShortCut support

David Faure david at mandrakesoft.com
Tue Jul 16 09:03:07 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 15 July 2002 22:42, Marc Mutz wrote:
> On Sunday 14 July 2002 11:44, Simon Hausmann wrote:
> <snip>
> > > But e.g. KWidgetAction and others don't have a ctor that takes a
> > > KGuiItem.
> > >
> > > If nobody else does this, I will develop it in the 3_0_branch and
> > > forward port it to HEAD.
> >
> > Sounds like a good addition.
> <snip>
> 
> Unfortunately, you'll get ambiguous ctors with most derived classes
> then, since there's an implicit type conversion ctor for
> QString->KGuiItem.
> 
> Hmm, if that was made explicit... Is adding the explicit keyword to a
> ctor BC? I guess so. But is it SC, too?
> The other option is to remove the default for the second argument to the
> 4xQString KGuiItem ctor. But that would be even more SIC, wouldn't it?
> 
> I tried the explicit keyword. When doing this, very many users of
> KDialogBase failed to compile, since the user-defined buttons take
> KGuiItems, but the users only provide QStrings most of the time :-(
> Removing the default argument will lead to the same problem.

Make the new ones explicit then, not the old ones.

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2-beta2 is out! http://dot.kde.org/1025176121/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9M9M772KcVAmwbhARAkjpAJ4sMbVHTxRY44Kz5E5FKQWg4jrIXACgrkQg
AJ7Y7lX9/rpykHW/uYFPOLQ=
=QtLz
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list