SVN commit 741508 by krake: DCOP -> D-Bus cleanup: - Removed the block marked by #warning since KApplication already does this kind of registering for us, i.e. registering appname + PID - Connect the aboutToConnect() and connected() signals from the ConnectWidget the main widget, since the KDE3 version emitted them through DCOP and this is now handled by the KpppAdaptor which in turn is connected to the main widget's signals. - Remove the D-Bus connect() statements since KPPP does not react to those signals but emits them. M +0 -6 connect.cpp M +2 -10 kpppwidget.cpp --- trunk/KDE/kdenetwork/kppp/connect.cpp #741507:741508 @@ -70,7 +70,6 @@ #include "runtests.h" #endif -#include #include "auth.h" #include "connect.h" #include "docking.h" @@ -113,11 +112,6 @@ modified_hostname = false; - QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.connect(QString(), "/Kppp", "org.kde.kppp", "aboutToConnect", this, SLOT(aboutToConnect())); - dbus.connect(QString(), "/Kppp", "org.kde.kppp", "connected", this, SLOT(connect())); - - QVBoxLayout *tl = new QVBoxLayout(this); tl->setSpacing(10); tl->setMargin(8); --- trunk/KDE/kdenetwork/kppp/kpppwidget.cpp #741507:741508 @@ -299,6 +299,8 @@ this, SLOT(saveMyself())); connect(KApplication::kApplication(), SIGNAL(aboutToQuit()), this, SLOT(shutDown())); + connect(con, SIGNAL(aboutToConnect()), this, SIGNAL(sig_aboutToConnect())); + connect(con, SIGNAL(connected()), this, SIGNAL(sig_connected())); debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55, debugwindow->width(),debugwindow->height()); @@ -353,16 +355,6 @@ if(!m_bCmdlAccount) showNews(); #endif -#ifdef __GNUC__ -#warning "kde4: port to dbus" -#endif -#if 0 - // attach to the DCOP server, if possible - if (!kapp->dcopClient()->attach()) - kDebug(5002) << "Error: Could not connect to the DCOP server"; - else - kapp->dcopClient()->registerAs(kapp->name(), true); -#endif // this timer will delay the actual disconnection DISCONNECTION_DELAY ms // to give applications time to shutdown, logout, whatever.. disconnectTimer = new QTimer(this);