summaryrefslogtreecommitdiff
path: root/app/pebbledinterface.cpp
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-12-01 04:13:06 +0100
committerJavier <dev.git@javispedro.com>2014-12-01 04:13:06 +0100
commit81f91639969de0f3852a3fe73db13b4cb0ecf3b4 (patch)
treeac5f3146707e0b46723bfdf13b7ced5cdf16633d /app/pebbledinterface.cpp
parentbe139d8ff95160782b424134a025b30c82083e28 (diff)
hackily implement openURL by signalling the URLs via D-Bus to the
settings app, which pops a webview
Diffstat (limited to 'app/pebbledinterface.cpp')
-rw-r--r--app/pebbledinterface.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/pebbledinterface.cpp b/app/pebbledinterface.cpp
index c6f5674..8759863 100644
--- a/app/pebbledinterface.cpp
+++ b/app/pebbledinterface.cpp
@@ -19,6 +19,10 @@ PebbledInterface::PebbledInterface(QObject *parent) :
PEBBLED_DBUS_SERVICE, PEBBLED_DBUS_PATH, PEBBLED_DBUS_IFACE,
"pebbleChanged", this, SLOT(onPebbleChanged()));
+ QDBusConnection::sessionBus().connect(
+ PEBBLED_DBUS_SERVICE, PEBBLED_DBUS_PATH, PEBBLED_DBUS_IFACE,
+ "openUrl", this, SIGNAL(openUrl(QString)));
+
// simulate connected change on active changed
// as the daemon might not had a chance to send 'connectedChanged'
// when going down
@@ -163,3 +167,15 @@ void PebbledInterface::reconnect()
qDebug() << __FUNCTION__;
PebbledDbusInterface.call("reconnect");
}
+
+void PebbledInterface::test()
+{
+ qDebug() << __FUNCTION__;
+ PebbledDbusInterface.call("test");
+}
+
+void PebbledInterface::webviewClosed(const QString &result)
+{
+ qDebug() << __FUNCTION__;
+ PebbledDbusInterface.call("webviewClosed", QVariant::fromValue(result));
+}