Commit 7221864c authored by Martin Flöser's avatar Martin Flöser

Start xclipboard sync process from build dir if available

Summary:
The xclipboard sync test times out on build.kde.org as KWin is not
installed prior to running the tests. This is due to KWin not finding
the executable for the clipboard sync helper.

This change looks whether the binary exists in the same directory as
KWin's executable. If it exists it is started instead of the hardcoded
path in libexec.

Test Plan: Run the test and verified the correct binary is loaded

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16732
parent f27f8a26
......@@ -63,6 +63,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Qt
#include <QDir>
#include <QFileInfo>
#include <QThread>
#include <QWindow>
......@@ -590,8 +592,14 @@ void WaylandServer::setupX11ClipboardSync()
}
);
m_xclipbaordSync.process->setProcessEnvironment(environment);
// start from build directory if executable is available there (e.g. autotests), otherwise start libexec executable
const QFileInfo clipboardSync{QDir{QCoreApplication::applicationDirPath()}, QStringLiteral("org_kde_kwin_xclipboard_syncer")};
if (clipboardSync.exists()) {
m_xclipbaordSync.process->start(clipboardSync.absoluteFilePath());
} else {
m_xclipbaordSync.process->start(QStringLiteral(KWIN_XCLIPBOARD_SYNC_BIN));
}
}
}
void WaylandServer::createInternalConnection()
......
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