From 543b6955d46281a7a5e007b2a0743e3ba3c96d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Thu, 8 Nov 2018 08:43:50 +0100 Subject: [PATCH] Add more debug output around starting the x clipboard syncer process Summary: Trying to get some more information on why the related test fails on build.kde.org. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16748 --- wayland_server.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wayland_server.cpp b/wayland_server.cpp index 6c590f6a06..bd4962480d 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -565,6 +565,7 @@ int WaylandServer::createXclipboardSyncConnection() void WaylandServer::setupX11ClipboardSync() { if (m_xclipbaordSync.process) { + qCWarning(KWIN_CORE) << "Tried to start x clipboard syncer although process already started"; return; } @@ -572,6 +573,7 @@ void WaylandServer::setupX11ClipboardSync() if (socket == -1) { delete m_xclipbaordSync.client; m_xclipbaordSync.client = nullptr; + qCWarning(KWIN_CORE) << "Could not create wayland socket for x clipboard syncer"; return; } if (socket >= 0) { @@ -580,10 +582,11 @@ void WaylandServer::setupX11ClipboardSync() environment.insert(QStringLiteral("DISPLAY"), QString::fromUtf8(qgetenv("DISPLAY"))); environment.remove("WAYLAND_DISPLAY"); m_xclipbaordSync.process = new Process(this); - m_xclipbaordSync.process->setProcessChannelMode(QProcess::ForwardedErrorChannel); + m_xclipbaordSync.process->setProcessChannelMode(QProcess::ForwardedChannels); auto finishedSignal = static_cast(&QProcess::finished); connect(m_xclipbaordSync.process, finishedSignal, this, [this] { + qCDebug(KWIN_CORE) << "X clipboard syncer process finished"; m_xclipbaordSync.process->deleteLater(); m_xclipbaordSync.process = nullptr; m_xclipbaordSync.ddi.clear(); @@ -596,8 +599,10 @@ void WaylandServer::setupX11ClipboardSync() // 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()) { + qCDebug(KWIN_CORE) << "Starting" << clipboardSync.absoluteFilePath(); m_xclipbaordSync.process->start(clipboardSync.absoluteFilePath()); } else { + qCDebug(KWIN_CORE) << "Starting" << KWIN_XCLIPBOARD_SYNC_BIN; m_xclipbaordSync.process->start(QStringLiteral(KWIN_XCLIPBOARD_SYNC_BIN)); } }