mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: don't sleep while waiting for D-Bus replies
waiting for D-Bus replies to finish is enough business Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
49637b249d
commit
8ac9b27855
2 changed files with 0 additions and 5 deletions
|
@ -31,7 +31,6 @@
|
|||
#include <syslog.h>
|
||||
|
||||
#define KAUTHORIZATION_TIMEOUT 250
|
||||
#define KAUTHORIZATION_SLEEPTIME 50
|
||||
|
||||
// see kdebug.areas
|
||||
static const int s_kauthorizationarea = 185;
|
||||
|
@ -148,7 +147,6 @@ int KAuthorization::execute(const QString &helper, const QString &method, const
|
|||
while (KDBusConnectionPool::isServiceRegistered(helper, QDBusConnection::systemBus())) {
|
||||
kDebug(s_kauthorizationarea) << "Waiting for service to unregister" << helper;
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, KAUTHORIZATION_TIMEOUT);
|
||||
QThread::msleep(KAUTHORIZATION_SLEEPTIME);
|
||||
}
|
||||
|
||||
QDBusInterface kauthorizationinterface(
|
||||
|
@ -159,7 +157,6 @@ int KAuthorization::execute(const QString &helper, const QString &method, const
|
|||
while (!reply.isFinished()) {
|
||||
kDebug(s_kauthorizationarea) << "Waiting for service call to finish" << helper;
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, KAUTHORIZATION_TIMEOUT);
|
||||
QThread::msleep(KAUTHORIZATION_SLEEPTIME);
|
||||
}
|
||||
int result = KAuthorization::NoError;
|
||||
if (!reply.isValid()) {
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#endif
|
||||
|
||||
#define KTOOLINVOCATION_TIMEOUT 250
|
||||
#define KTOOLINVOCATION_SLEEPTIME 50
|
||||
|
||||
// NOTE: keep in sync with:
|
||||
// kdelibs/kinit/klauncher_adaptor.h
|
||||
|
@ -135,7 +134,6 @@ int KToolInvocation::startServiceInternal(const char *_function,
|
|||
kDebug() << "Waiting for klauncher call to finish" << function;
|
||||
while (!reply.isFinished()) {
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, KTOOLINVOCATION_TIMEOUT);
|
||||
QThread::msleep(KTOOLINVOCATION_SLEEPTIME);
|
||||
}
|
||||
kDebug() << "Done waiting for klauncher call to finish" << function;
|
||||
if (!reply.isValid()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue