Commit 18412064 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fix using kdeconnect-settings when instance is already running

kdeconnect-settings is a single-instance app

When activating an existing instance actually load the requested settings part

Bump KF5 dependency to 5.95 to include frameworks/kcmutils!90, otherwise there's a crash
parent e703b8b6
......@@ -12,7 +12,7 @@ if (SAILFISHOS)
set(KF5_MIN_VERSION "5.36.0")
set(QT_MIN_VERSION "5.6.0")
else()
set(KF5_MIN_VERSION "5.89.0")
set(KF5_MIN_VERSION "5.95.0")
set(QT_MIN_VERSION "5.10.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.84.0")
endif()
......
......@@ -46,6 +46,16 @@ int main(int argc, char** argv)
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
QObject::connect(&dbusService, &KDBusService::activateRequested, dialog, [dialog](const QStringList &args, const QString &/*workingDir*/) {
QCommandLineParser parser;
parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args")));
parser.parse(args);
dialog->clear();
dialog->addModule(KPluginMetaData(QStringLiteral("kcm_kdeconnect")), {parser.value(QStringLiteral("args"))});
});
app.setQuitOnLastWindowClosed(true);
return app.exec();
......
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