[Patch] KDialog / KDialogBase

Olivier Goffart ogoffart at kde.org
Mon Jan 2 13:33:19 GMT 2006

Le Lundi 2 Janvier 2006 14:05, David Faure a écrit :
> On Monday 02 January 2006 13:45, Olivier Goffart wrote:
> > > Probably want to move KDialogQueuePrivate into a kdialog_p.h file
> >
> > I even would like to remove that class.
> You mean KDialogQueue itself, right?


> > It is used only for KMessageBox::queuedMessageBox
> > but it could use show() instead of exec() and the result will be the same
> Not really since the idea is to only show one queued message box at a time,
> to avoid flooding the user with 10 at the same time.

Ah, i was not thinking about this.

I see a workaround
static QPointer<KDialog> currentMessageBox;

if( currentMessageBox )

> The other difference is that if you delete the parent widget between "now"
> and the next event loop, you don't see a message box that appears and
> disappears immediately. This could happen with HTML pages that use a
> redirection. Not sure if (with Qt4, especially) the message box would have
> time to appear, though.
> It's true that making the message boxes non-modal already solves half of
> the goal of queueing though, since the main goal was to avoid
> sub-event-loops.

I was thinking to a design like i did in KNotification

KMessageBox : public QObject {
      void result(int button);
      KMessageBox* queuedMessageBox( ..... );

That would solve the problem i have actually with queued messagebox:
 - questions are not possible
 - dontshowagain is not possible

> I wonder why we didn't make them non-modal in qt3. 

Probably KMessageBox has been designed to be used with exec() and it's 
difficult to change, specially because there is lots of function in that 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060102/e67794b1/attachment.sig>

More information about the kde-core-devel mailing list