Handling of default button in KDialog broken
André Wöbbeking
Woebbeking at kde.org
Fri Jul 4 15:46:15 BST 2008
On Friday 04 July 2008, Lubos Lunak wrote:
> Hello,
>
> could somebody please review the attached patch? It appears that
> KDialog has a bug with (not) setting the default button properly,
I just had a bug report about that in Cervisia.
> which has been there since about forever.
No, it worked in KDE3.
> The KDialog code has some function called setButtonFocus(), which
> however seems to be just a thin wrapper used for confusing things.
> Making a button default does not set focus to it, making it useless
> in many cases. It appears that e.g. KMessageBox works this around by
> explicitly later setting focus to the button (which however actually
> resets the button from being the default). I suggest the attached
> patch, which will normally make default buttons focused by default
> (and consistent with QMessageBox::setDefaultButton()).
>
> Does somebody see a problem with it?
It depends on the dialog. If you've a lineedit in the dialog it should
have focus and not a button.
IMO it's a Qt regression to give focus to a button which is not the
default one.
Cheers,
André
More information about the kde-core-devel
mailing list