From 507c4f275b6f1a1e9b1269d9002db4cd762053ca Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 18 Oct 2019 14:22:28 +0200 Subject: Client: Print a warning when trying to set clipboard without a seat This warning can save some time when trying to understand why some qtbase auto tests are failing on headless Weston (which doesn't have seats at the moment). Change-Id: I361546611d12bff8a465af5bb103f61e80d73a15 Reviewed-by: Pier Luigi Fiorini --- src/client/qwaylandclipboard.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp index 369c6ec07..c3a526ddc 100644 --- a/src/client/qwaylandclipboard.cpp +++ b/src/client/qwaylandclipboard.cpp @@ -93,8 +93,10 @@ QMimeData *QWaylandClipboard::mimeData(QClipboard::Mode mode) void QWaylandClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) { auto *seat = mDisplay->currentInputDevice(); - if (!seat) + if (!seat) { + qCWarning(lcQpaWayland) << "Can't set clipboard contents with no wl_seats available"; return; + } static const QString plain = QStringLiteral("text/plain"); static const QString utf8 = QStringLiteral("text/plain;charset=utf-8"); -- cgit v1.2.3