Skip to content

Commit

Permalink
Update powerkit.cpp
Browse files Browse the repository at this point in the history
Only allow one instance of config
  • Loading branch information
rodlie committed Feb 8, 2024
1 parent c32ca84 commit 95fc98f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/powerkit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ int main(int argc, char *argv[])

QStringList args = QApplication::arguments();
if (args.contains("--config")) {
if (!QDBusConnection::sessionBus().registerService(POWERKIT_CONFIG)) {
qWarning() << QObject::tr("A powerkit config instance is already running");
return 1;
}
PowerKit::Dialog dialog;
dialog.show();
return a.exec();
Expand Down

0 comments on commit 95fc98f

Please sign in to comment.