<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Monospace'; font-size:10pt; font-weight:400; font-style:normal;">On Monday 24 November 2008 08:30:06 Louai Al-Khanji wrote:<br>
> On Sun, Nov 23, 2008 at 12:36 PM, Sebastian Trüg <trueg@kde.org> wrote:<br>
> > On Saturday 22 November 2008 23:08:00 Thiago Macieira wrote:<br>
> >> Sebastian Trüg wrote:<br>
> >> >The attached patch makes queued dialogs thread-safe. With it, queued<br>
> >> >KMessagesBoxes and thus, the default KMessage messasge handler.<br>
> >> >This fixes a crash in KRunner when KMimeType tried to complain about<br>
> >> > missing mimetypes using KMessage which in turn uses KMessageBox which<br>
> >> > tries to open a QWidget from a thread which is not the GUI thread<br>
> >> > which triggers an assert. :)<br>
> >> ><br>
> >> >May I apply?<br>
> >><br>
> >> What's the number 20? Where did the 20 milliseconds timer come from? Why<br>
> >> not 25?<br>
> >><br>
> >> I know it's not your code, but maybe someone else knows where this value<br>
> >> came from. Let's not keep arbitrary things.<br>
> ><br>
> > hm, you are right. I simply kept the timeout from the second singleshot.<br>
> > But AFAICS 0 should be fine here.<br>
> > --<br>
> > Sebastian Trueg<br>
> > Sponsored by Mandriva to work on Nepomuk-KDE.<br>
> ><br>
> > http://nepomuk.kde.org<br>
><br>
> How about using QMetaObject::invokeMethod instead of a timer with 0<br>
> time out? Just seems cleaner to me.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I did not know about that. Thanks. This indeed seems cleaner. New patch attached.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Cheers,<br>
Sebastian<br>
-- <br>
Sebastian Trueg<br>
Sponsored by Mandriva to work on Nepomuk-KDE.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>http://nepomuk.kde.org<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>