From 8696681c5ce83713c1de21b80e314e8f9dac1824 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 26 May 2022 15:56:30 +0300 Subject: [PATCH] generic: process all events and use KJob::exec() instead of QEventLoop Signed-off-by: Ivailo Monev --- kio/kfile/kpropertiesdialog.cpp | 15 +++------------ kio/kio/netaccess.cpp | 2 +- kparts/part.cpp | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index 1dc60db0..0d457219 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -1306,10 +1306,7 @@ void KFilePropsPlugin::applyChanges() connect( job, SIGNAL(renamed(KIO::Job*,KUrl,KUrl)), SLOT(slotFileRenamed(KIO::Job*,KUrl,KUrl)) ); // wait for job - QEventLoop eventLoop; - connect(this, SIGNAL(leaveModality()), - &eventLoop, SLOT(quit())); - eventLoop.exec(QEventLoop::ExcludeUserInputEvents); + job->exec(); return; } properties->updateUrl(properties->kurl()); @@ -2481,10 +2478,7 @@ void KFilePermissionsPropsPlugin::applyChanges() connect( job, SIGNAL(result(KJob*)), SLOT(slotChmodResult(KJob*)) ); - QEventLoop eventLoop; - connect(this, SIGNAL(leaveModality()), - &eventLoop, SLOT(quit())); - eventLoop.exec(QEventLoop::ExcludeUserInputEvents); + job->exec(); } if (dirs.count() > 0) { job = KIO::chmod( dirs, orDirPermissions, ~andDirPermissions, @@ -2496,10 +2490,7 @@ void KFilePermissionsPropsPlugin::applyChanges() connect( job, SIGNAL(result(KJob*)), SLOT(slotChmodResult(KJob*)) ); - QEventLoop eventLoop; - connect(this, SIGNAL(leaveModality()), - &eventLoop, SLOT(quit())); - eventLoop.exec(QEventLoop::ExcludeUserInputEvents); + job->exec(); } } diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index 717adc24..ef755805 100644 --- a/kio/kio/netaccess.cpp +++ b/kio/kio/netaccess.cpp @@ -411,7 +411,7 @@ void NetAccess::enter_loop() QEventLoop eventLoop; connect(this, SIGNAL(leaveModality()), &eventLoop, SLOT(quit())); - eventLoop.exec(QEventLoop::ExcludeUserInputEvents); + eventLoop.exec(); } void NetAccess::slotResult( KJob * job ) diff --git a/kparts/part.cpp b/kparts/part.cpp index b8c0e2cd..2dd30271 100644 --- a/kparts/part.cpp +++ b/kparts/part.cpp @@ -1012,7 +1012,7 @@ bool ReadWritePart::waitSaveComplete() d->m_waitForSave = true; - d->m_eventLoop.exec(QEventLoop::ExcludeUserInputEvents); + d->m_eventLoop.exec(); d->m_waitForSave = false;