Commit 9b5d7ee6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

dbus support

parent 9f02ca85
......@@ -21,7 +21,7 @@ kconfig_add_kcfg_files(ksquares_SRCS GENERATE_MOC settings.kcfgc) #GENERATE_MOC
kde4_add_app_icon(ksquares_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-apps-ksquares.png")
add_executable(ksquares ${ksquares_SRCS})
target_link_libraries(ksquares KF5KDEGames KF5::KDELibs4Support)
target_link_libraries(ksquares KF5KDEGames KF5::KDELibs4Support KF5::DBusAddons)
install(TARGETS ksquares ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -16,6 +16,7 @@
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <kdelibs4configmigrator.h>
#include <KDBusService>
#include "ksquareswindow.h"
#include "ksquaresdemowindow.h"
......@@ -28,6 +29,8 @@ static const char version[] = "0.5";
int main(int argc, char **argv)
{
QApplication app(argc, argv);
Kdelibs4ConfigMigrator migrate(QLatin1String("ksquares"));
migrate.setConfigFiles(QStringList() << QLatin1String("ksquaresrc"));
migrate.setUiFiles(QStringList() << QLatin1String("ksquaresui.rc"));
......@@ -40,7 +43,6 @@ int main(int argc, char **argv)
about.addCredit(i18n("Fela Winkelmolen"), i18n("Many patches and bugfixes"));
about.addCredit(i18n("Tom Vincent Peters"), i18n("Hard AI"));
QApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(about);
parser.addVersionOption();
......@@ -51,7 +53,7 @@ int main(int argc, char **argv)
about.setupCommandLine(&parser);
parser.process(app);
about.processCommandLine(&parser);
KDBusService service;
// default names for players
KConfigGroup cg(KSharedConfig::openConfig(), "General");
......
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