mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: process all events while waiting for job to finish in KJob::exec()
fixes hang in case the job progress is not hidden and UI events have to be processed Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
738b4caea0
commit
f53dc16596
2 changed files with 1 additions and 7 deletions
|
@ -196,7 +196,7 @@ bool KJob::exec()
|
|||
|
||||
start();
|
||||
while( !d->isFinished ) {
|
||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
return ( d->error == NoError );
|
||||
}
|
||||
|
|
|
@ -243,12 +243,6 @@ public:
|
|||
* You should avoid calling exec() whenever you can and use the asynchronous interface of KJob
|
||||
* instead.
|
||||
*
|
||||
* Note that user input events will not be processed while the job is being executed, which
|
||||
* means your user interface will effectivly be blocked. Other events like paint or network
|
||||
* events are still being processed. The advantage of not processing user input events is that
|
||||
* the chance of accidental reentrancy is greatly reduced. Still you should avoid calling this
|
||||
* function.
|
||||
*
|
||||
* Another thing to note is that the result of the job will be emited after the execution
|
||||
* finishes.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue