From c40a729ba73ab82bf75fe6c36b977ae17807b75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 24 Mar 2018 22:24:26 +0000 Subject: [PATCH] Do not allow the second instance of Partition Manager. BUG: 365882 --- CMakeLists.txt | 1 + src/CMakeLists.txt | 1 + src/main.cpp | 3 +++ 3 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f240c37..023cd7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED ConfigWidgets CoreAddons Crash + DBusAddons I18n IconThemes JobWidgets diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 476d269..01a14f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,7 @@ target_link_libraries(partitionmanager ${BLKID_LIBRARIES} KF5::ConfigWidgets KF5::CoreAddons KF5::Crash + KF5::DBusAddons KF5::I18n KF5::IconThemes KF5::JobWidgets diff --git a/src/main.cpp b/src/main.cpp index cbf7a3e..81dc244 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -73,6 +74,8 @@ int Q_DECL_IMPORT main(int argc, char* argv[]) parser.process(app); aboutData.processCommandLine(&parser); + KDBusService service(KDBusService::Unique); + registerMetaTypes(); Config::instance(QStringLiteral("partitionmanagerrc"));