Commit 3c35db2b authored by Sebastian Kügler's avatar Sebastian Kügler Committed by Daniel Vrátil
Browse files

call the dbus service from the test app

Not sure why it doesn't work yet, but it's a start.
parent 8c623dee
......@@ -20,6 +20,9 @@
#include "../../kded/osdmanager.h"
#include <QCoreApplication>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDBusPendingCall>
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(KSCREEN_KDED, "kscreen.kded")
......@@ -40,8 +43,17 @@ void OsdTest::showOutputIdentifiers()
QTimer::singleShot(5500, qApp, &QCoreApplication::quit);
KScreen::OsdManager::self()->showOutputIdentifiers();
} else {
qCWarning(KSCREEN_KDED) << "Implement me.";
QTimer::singleShot(100, qApp, &QCoreApplication::quit);
QDBusMessage msg = QDBusMessage::createMethodCall(
QLatin1Literal("org.kde.kscreen.osdService"),
QLatin1Literal("/org/kde/kscreen/osdService"),
QLatin1Literal("org.kde.kscreen.osdService"),
QLatin1Literal("showOutputIdentifiers")
);
//msg << icon << text;
QDBusConnection::sessionBus().asyncCall(msg);
qCWarning(KSCREEN_KDED) << "Sent dbus message.";
QTimer::singleShot(500, qApp, &QCoreApplication::quit);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment