Don't show again queuedMessageBox.

Olivier Goffart ogoffart at
Sun Oct 17 15:53:08 BST 2004


In general, for information or error messages box (which doesn't need to 
return a button code), it's much safer to uses queuedMessageBox in place of 
usual KMessageBox accessor.

And sometimes, this is even _needed_ to don't crash.  
(This is for example the case of the message box the bug 84775 relate)

Several times in the past, I prefered to uses the KMessageBox::information 
insteads of queuedMessageBox because i wanted to have the "don't show again" 
checkbox. I take the risk no socket or users operations will left the program 
in a unstable state when this messagebox is running.

In other case where the queuedMessageBox was realy needed. I was forced to 
don't put the "Don't show again".  which may be annoying for certain users  
(example Bug 84775)

That's because queuedMessageBox doesn't have yet the possibility to have a 
dontshowagain checkbox.

A first solution could be to simply adding it.  This has already been proposed 
in the past:
but it seems it's not so simple (quoting Ingo Kloeker in
> I realized why a queuedMessageBox doesn't have dontAskAgainName 
> parameter. The reason is that the state of this checkbox will be 
> checked directly after the dialog is put in the dialog queue and not 
> when the dialog is closed by the user. In order to make a "Don't ask 
> again" checkbox work in a queuedMessageBox we would have to derive a 
> class from KDialogBase which saves the state of the checkbox in it's 
> d'tor. That should be done sometime but probably not now.

Another idea is to deprecate queuedMessageBox, and uses an flag in the Options 
of usuals KMessageBox functions.
I already proposed this, but at this time, i was not aware of the existance of 
(a patch is attached at this mail)

The advantage of this is that it's IMO a better API.
It uses the same functions names as normal messages box so it is esier to 
And I even think that the flag should be there by deffault for messagesbox 
that doesn't ask questions.

Anyway, that unfortunately doesn't fix the above problem.

I would like to have your suggestions or idea to know in what dirrection i 
should go to add that checkbox on queued messageboxes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list