summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-18 14:22:28 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-10-21 12:41:08 +0000
commit507c4f275b6f1a1e9b1269d9002db4cd762053ca (patch)
treee68f81c8783dbc65cb5fd3294eca20cd4b257065
parent29fcb97446ae2c1d89e537f3a04c5a87a275e3bd (diff)
downloadqtwayland-507c4f275b6f1a1e9b1269d9002db4cd762053ca.tar.gz
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 <pierluigi.fiorini@liri.io>
-rw-r--r--src/client/qwaylandclipboard.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp
index 369c6ec0..c3a526dd 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");