[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: KDE/kdebase/runtime/khelpcenter
From: David Faure <faure () kde ! org>
Date: 2008-01-28 15:37:16
Message-ID: 200801281637.16610.faure () kde ! org
[Download RAW message or body]
On Monday 28 January 2008, Ralf Habacker wrote:
> David Faure schrieb:
> > On Monday 28 January 2008, you wrote:
> >
> >> Oswald Buddenhagen schrieb:
> >>
> >>> On Mon, Jan 28, 2008 at 02:04:56PM +0100, David Faure wrote:
> >>>
> >>>
> >>>>>> + while (mSearchRunning && mProc->state() == QProcess::Running)
> >>>>>> kapp->processEvents();
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> i know that's not your idea, but it is a pretty terrible one, so you
> >>>>> might want to refactor this code.
> >>>>>
> >>>>>
> >>>> Looks like this is exactly what waitForFinished does now, isn't it?
> >>>>
> >>>>
> >>>>
> >>> yup - if synchronous operation is wanted.
> >>> in this case, it is supposed to be async (i think). it's just that this
> >>> nested pseudo evenloop is pure evil.
> >>>
> >>>
> >> unfortunally the callers of SearchEngine::search() expects synchronous
> >> operation in case of errors and async only in the case of no error
> >> finish, which is the real problem.
> >>
> >
> > So I was right that the equivalent of the old code is to call waitForFinished,
> > even though this isn't the nicest solution :)
> >
> no, the doc about waitForFinished() says:
>
> This function can operate without an event loop. It is useful when
> writing non-GUI applications and when performing I/O operations in a
> non-GUI thread.
>
> Warning: Calling this function from the main (GUI) thread might cause
> your user interface to freeze.
I see. You are right.
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic