diff --git a/CMakeLists.txt b/CMakeLists.txt index c61a9aa..381ea75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.21) +cmake_policy(SET CMP0057 NEW) project(chigraph-gui) diff --git a/src/thememanager.cpp b/src/thememanager.cpp index 37e1cca..c6e1e87 100644 --- a/src/thememanager.cpp +++ b/src/thememanager.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -60,16 +61,19 @@ ThemeManager::ThemeManager(KActionMenu* menu) : mMenu{menu} { auto configAct = new QAction(i18n("Configuration..."), mMenu); configAct->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-theme"))); mMenu->addAction(configAct); - connect(configAct, &QAction::triggered, this, [] { + connect(configAct, &QAction::triggered, this, [this] { // open the colors dialog - int errCode = KToolInvocation::kdeinitExec(QStringLiteral("kcmshell5"), - QStringList(QStringLiteral("colors"))); - - if (errCode > 0) { - KMessageBox::error(0, - i18n("Cannot start Colors Settings panel from KDE Control Center. " - "Please check your system...")); - } + auto job = new KIO::CommandLauncherJob(QStringLiteral("kcmshell5 colors")); + job->setAutoDelete(true); + job->start(); + + connect(job, &KIO::CommandLauncherJob::finished, this, [](KJob* job) { + if (job->error() != 0) { + KMessageBox::error( + 0, i18n("Cannot start Colors Settings panel from KDE Control Center. " + "Please check your system...")); + } + }); }); } diff --git a/third_party/nodeeditor b/third_party/nodeeditor index 364d8db..d77bdf1 160000 --- a/third_party/nodeeditor +++ b/third_party/nodeeditor @@ -1 +1 @@ -Subproject commit 364d8db7026af319de8c08162490e1ce73f710c5 +Subproject commit d77bdf132aadb169a47e467b7206c24890675abe