summaryrefslogtreecommitdiffstats
path: root/examples/dbus/complexpingpong/complexpong.cpp
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2015-10-16 01:36:16 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2015-10-19 10:29:50 +0000
commit59b860450fef906d72d6a343190ba2d45383aba6 (patch)
tree92e26d62845a5b07aeb374540393677269a501c8 /examples/dbus/complexpingpong/complexpong.cpp
parent3cae29b746df804ddfa37a3e27b48bd89686d2c1 (diff)
Polish the complexpingpong example
- Use QDBusServiceWatcher to detect that pong service became available (QDBusConnectionInterface::serviceOwnerChanged() signal is deprecated). - Use new connection syntax. Task-number: QTBUG-28082 Change-Id: I7b93b961ee6d45aaeefab77fa1d1943e38b4a4c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'examples/dbus/complexpingpong/complexpong.cpp')
-rw-r--r--examples/dbus/complexpingpong/complexpong.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/dbus/complexpingpong/complexpong.cpp b/examples/dbus/complexpingpong/complexpong.cpp
index 0e0d5fed76..682e301f12 100644
--- a/examples/dbus/complexpingpong/complexpong.cpp
+++ b/examples/dbus/complexpingpong/complexpong.cpp
@@ -61,7 +61,7 @@ void Pong::setValue(const QString &newValue)
void Pong::quit()
{
- QTimer::singleShot(0, QCoreApplication::instance(), SLOT(quit()));
+ QTimer::singleShot(0, QCoreApplication::instance(), &QCoreApplication::quit);
}
QDBusVariant Pong::query(const QString &query)
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
QObject obj;
Pong *pong = new Pong(&obj);
- pong->connect(&app, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ QObject::connect(&app, &QCoreApplication::aboutToQuit, pong, &Pong::aboutToQuit);
pong->setProperty("value", "initial value");
QDBusConnection::sessionBus().registerObject("/", &obj);