From 1c67c2e281f8a5e1af5ae2ef697e570bdd50514b Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 22 Oct 2019 10:17:56 +0200 Subject: Fix missing emission of QClipboard::selectionChanged And add a test to verify we've fixed it. Change-Id: Ic6d5e64b3000444465935f7caf7e32ec9c4f1012 Reviewed-by: Paul Olav Tvete --- src/client/qwaylandprimaryselectionv1.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client/qwaylandprimaryselectionv1.cpp') diff --git a/src/client/qwaylandprimaryselectionv1.cpp b/src/client/qwaylandprimaryselectionv1.cpp index 3ddf6dac3..832f96780 100644 --- a/src/client/qwaylandprimaryselectionv1.cpp +++ b/src/client/qwaylandprimaryselectionv1.cpp @@ -96,6 +96,15 @@ QWaylandPrimarySelectionDeviceV1::~QWaylandPrimarySelectionDeviceV1() destroy(); } +void QWaylandPrimarySelectionDeviceV1::invalidateSelectionOffer() +{ + if (!m_selectionOffer) + return; + + m_selectionOffer.reset(); + QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Selection); +} + void QWaylandPrimarySelectionDeviceV1::setSelectionSource(QWaylandPrimarySelectionSourceV1 *source) { if (source) { -- cgit v1.2.3