KAction subclass ctors lack KGuiItem/KShortCut support

Marc Mutz Marc.Mutz at uni-bielefeld.de
Mon Jul 15 21:42:32 BST 2002


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

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.

Marc

- --
Marc Mutz <mutz at kde.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9MzO43oWD+L2/6DgRAt9LAKC3aYSfZWlTDI0yCKDkp9E/iyH0ewCeJpmY
FKjgPOUbpF+K2oa5sUOnwqw=
=0+wQ
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list