mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: process all events and use KJob::exec() instead of QEventLoop
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5275fdc8a4
commit
8696681c5c
3 changed files with 5 additions and 14 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue