mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
gwenview: process all events while waiting for document to be loaded and MIME type to be determined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6fd2ddf25d
commit
9d46d64323
2 changed files with 2 additions and 2 deletions
|
@ -293,7 +293,7 @@ void Document::waitUntilLoaded()
|
|||
if (state == Loaded || state == LoadingFailed) {
|
||||
return;
|
||||
}
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
qApp->processEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ QString urlMimeTypeByContent(const KUrl& url)
|
|||
KIO::TransferJob* job = KIO::get(url);
|
||||
DataAccumulator accumulator(job);
|
||||
while (!accumulator.finished() && accumulator.data().size() < HEADER_SIZE) {
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
qApp->processEvents();
|
||||
}
|
||||
return KMimeType::findByContent(accumulator.data())->name();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue