[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kio/kio=3A_Do_not_ignore_repar?=
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2011-03-09 2:22:44
Message-ID: 20110309022244.9F294A60B0 () git ! kde ! org
[Download RAW message or body]

Git commit 65488a7cdc06b1475f1b726f3403eee225282522 by Dawit Alemayehu.
Committed on 09/03/2011 at 03:21.
Pushed by adawit into branch 'KDE/4.6'.

Do not ignore reparse configuration notifications that originate from an
application's own configuration dialog.

REVIEW:100819

M  +10   -5    kio/kio/scheduler.cpp     

http://commits.kde.org/kdelibs/65488a7cdc06b1475f1b726f3403eee225282522

diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp
index d5fab85..02c8e15 100644
--- a/kio/kio/scheduler.cpp
+++ b/kio/kio/scheduler.cpp
@@ -658,7 +658,8 @@ public:
     SchedulerPrivate()
      : q(new Scheduler()),
        m_slaveOnHold(0),
-       m_checkOnHold(true) // !! Always check with KLauncher for the first request
+       m_checkOnHold(true), // !! Always check with KLauncher for the first request
+       m_ignoreConfigReparse(false)
     {
     }
 
@@ -678,6 +679,7 @@ public:
     Slave *m_slaveOnHold;
     KUrl m_urlOnHold;
     bool m_checkOnHold;
+    bool m_ignoreConfigReparse;
 
     SessionData sessionData;
     QMap<QObject *,WId> m_windowList;
@@ -866,20 +868,23 @@ void Scheduler::checkSlaveOnHold(bool b)
 
 void Scheduler::emitReparseSlaveConfiguration()
 {
-    emit self()->reparseSlaveConfiguration( QString() );
-
     // Do it immediately in this process, otherwise we might send a request before reparsing
     // (e.g. when changing useragent in the plugin)
     schedulerPrivate->slotReparseSlaveConfiguration(QString(), QDBusMessage());
+
+    schedulerPrivate->m_ignoreConfigReparse = true;
+    emit self()->reparseSlaveConfiguration( QString() );
 }
 
 
-void SchedulerPrivate::slotReparseSlaveConfiguration(const QString &proto, const QDBusMessage& msg)
+void SchedulerPrivate::slotReparseSlaveConfiguration(const QString &proto, const QDBusMessage&)
 {
-    if (QDBusConnection::sessionBus().baseService() == msg.service()) {
+    if (m_ignoreConfigReparse) {
         kDebug(7006) << "Ignoring signal sent by myself";
+        m_ignoreConfigReparse = false;
         return;
     }
+
     kDebug(7006) << "proto=" << proto;
     KProtocolManager::reparseConfiguration();
     SlaveConfig::self()->reset();

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic