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

List:       kde-devel
Subject:    How to gracefully kill a KUniqueApplication and wait for its termination?
From:       Ilya Basin <basinilya () gmail ! com>
Date:       2013-03-15 2:10:37
Message-ID: 959266001.20130315061037 () gmail ! com
[Download RAW message or body]

Hi list!
There's such app called bluedevilmonolithic. It goes to background on
start.
Current code to terminate it:

  void BlueDevilDaemon::monolithicQuit(QDBusPendingCallWatcher* watcher)
  {
    // can restart here?
  }

    QDBusMessage msg = QDBusMessage::createMethodCall(
        "org.kde.bluedevilmonolithic",
        "/MainApplication",
        "org.kde.KApplication",
        "quit"
    );
    QDBusPendingCall pending = QDBusConnection::sessionBus().asyncCall(msg);
    QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pending);
    connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), \
SLOT(monolithicQuit(QDBusPendingCallWatcher*)));

Is it too soon to try starting a new instance in monolithicQuit() ?
I don't see a call to QDBusConnectionInterface::unregisterService() in
kuniqueapplication.cpp. Does it mean that it unregisters only when the
process dies?



> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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