Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 97beb72d authored by Martin Flöser's avatar Martin Flöser

Support starting the rules_dialog from build dir

As with all libexec executables we first need to test whether the binary
is available in the application's directory and start this, otherwise
the system wide installed one.


Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent bf19c41b
......@@ -28,6 +28,7 @@ along with this program. If not, see <>.
#include <QFile>
#include <QFileInfo>
#include <QDebug>
#include <QDir>
#ifndef KCMRULES
#include "client.h"
......@@ -1047,7 +1048,8 @@ void RuleBook::edit(AbstractClient* c, bool whole_app)
QProcess *p = new Process(this);
const QFileInfo buildDirBinary{QDir{QCoreApplication::applicationDirPath()}, QStringLiteral("kwin_rules_dialog")};
p->setProgram(buildDirBinary.exists() ? buildDirBinary.absoluteFilePath() : QStringLiteral(KWIN_RULES_DIALOG_BIN));
connect(p, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), p, &QProcess::deleteLater);
connect(p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this,
[p] (QProcess::ProcessError e) {
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