|
|
|
@ -39,7 +39,7 @@ NotificationDaemon::NotificationDaemon() : KUniqueApplication()
|
|
|
|
|
// init session connection to dbus
|
|
|
|
|
if (!initDBUS()) {
|
|
|
|
|
tqDebug("Failed to initialize the connection to DBus");
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQT_SLOT(slotReconnect()));
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQ_SLOT(slotReconnect()));
|
|
|
|
|
retryCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -73,16 +73,16 @@ bool NotificationDaemon::initDBUS(){
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
mConnection.scheduleDispatch();
|
|
|
|
|
mConnection.connect(this, TQT_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
mConnection.connect(this, TQ_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
|
|
|
|
|
TQTimer::singleShot(10, this, TQT_SLOT(slotConnectionCheck()));
|
|
|
|
|
TQTimer::singleShot(10, this, TQ_SLOT(slotConnectionCheck()));
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void NotificationDaemon::close() {
|
|
|
|
|
if(mConnection.isConnected()) {
|
|
|
|
|
mConnection.disconnect(this, TQT_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
mConnection.disconnect(this, TQ_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
mConnection.closeConnection(NOTIFICATIONS_DBUS_SRVC);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -95,7 +95,7 @@ void NotificationDaemon::slotReconnect() {
|
|
|
|
|
if (DBUS_CONNECTION_RETRY > retryCount) {
|
|
|
|
|
tqFatal("Failed to initialize the connection to DBus");
|
|
|
|
|
}
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQT_SLOT(slotReconnect()));
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQ_SLOT(slotReconnect()));
|
|
|
|
|
retryCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|