Commit 2ead8772 authored by Laurent Montel's avatar Laurent Montel 😁

add dbus support

parent 312a6609
......@@ -24,7 +24,7 @@ set(kgoldrunner_SRCS
kde4_add_app_icon(kgoldrunner_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-apps-kgoldrunner.png")
add_executable(kgoldrunner ${kgoldrunner_SRCS})
target_link_libraries(kgoldrunner KF5KDEGames KF5KDEGamesPrivate KF5::KDELibs4Support)
target_link_libraries(kgoldrunner KF5KDEGames KF5KDEGamesPrivate KF5::KDELibs4Support KF5::DBusAddons)
install(TARGETS kgoldrunner ${INSTALL_TARGETS_DEFAULT_ARGS} )
......
......@@ -26,6 +26,7 @@
#include <KLocalizedString>
#include <QCommandLineParser>
#include "kgoldrunner.h"
#include <KDBusService>
static const char description[] =
I18N_NOOP ("KGoldrunner is a game of action and puzzle solving");
......@@ -43,6 +44,7 @@ int main (int argc, char **argv)
// Error message;
return 2;
}
QApplication app(argc, argv);
KAboutData about ("kgoldrunner", i18n ("KGoldrunner"),
version, i18n (description),
......@@ -51,7 +53,6 @@ int main (int argc, char **argv)
"http://games.kde.org/kgoldrunner" );
addCredits (about);
QApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(about);
parser.addVersionOption();
......@@ -59,7 +60,7 @@ int main (int argc, char **argv)
about.setupCommandLine(&parser);
parser.process(app);
about.processCommandLine(&parser);
KDBusService service;
// See if we are starting with session management.
if (app.isSessionRestored()) {
// New RESTORE (KGrController);
......
Markdown is supported
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