[PATCH] Fix KMessageBox::warningYesNoCancel message box creation
Waldo Bastian
bastian at kde.org
Tue Jun 8 15:40:06 BST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue June 8 2004 13:25, ismail donmez wrote:
> Hi,
>
> While trying to fix a Konversation bug I think I found a bug in
> kmessagebox.cpp.
>
> Looking at kmessagebox.cpp line 349 function
> void KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
> ButtonCode result)
>
> If a user chooses "Do not show again" option it writes "yes" to config
> dialog ( according to code ) :
It writes either "yes" or "no", depending on whether the user clicks yes or
no.
> config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no");
>
> But at line 319 in function
>
> bool KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
> ButtonCode &result)
>
> it does
>
> if (dontAsk == "yes") {
> result = Yes;
> return false;
> }
> if (dontAsk == "no") {
> result = No;
> return false; <----- This looks wrong
> }
It's ok though.
> So even if user choose to show or not the show dialog again if there is a
> yes/no config entry dialog will not be shown.
"no" means "don't show dialog and answer the question with no".
An empty value / no value means that the dialog should be shown. The return
value indicates whether to show the dialog or not.
Use KMessageBox::enableMessage if the dialog should be shown again.
Cheers,
Waldo
- --
bastian at kde.org | KDE Community World Summit 2004 | bastian at suse.com
bastian at kde.org | 21-29 August, Ludwigsburg, Germany | bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAxc/GN4pvrENfboIRAr2KAKCFAm5XRUK0L1nCm0JMGcPyYBUInACgiG9W
LSNQwJZ8pI7KbI2dzqBmRVs=
=8az7
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list