From 005dc0165e6d4547587314737820c717658fe7eb Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Sun, 10 Nov 2024 20:44:38 +0100 Subject: [PATCH] Wayland: Update code from kguiaddons (commit 333ba24) --- src/platform/x11/systemclipboard/waylandclipboard.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/x11/systemclipboard/waylandclipboard.cpp b/src/platform/x11/systemclipboard/waylandclipboard.cpp index c9fb5d967..94d718f9e 100644 --- a/src/platform/x11/systemclipboard/waylandclipboard.cpp +++ b/src/platform/x11/systemclipboard/waylandclipboard.cpp @@ -249,7 +249,9 @@ class DataControlOffer : public QMimeData, public QtWayland::zwlr_data_control_o protected: void zwlr_data_control_offer_v1_offer(const QString &mime_type) override { - m_receivedFormats << mime_type; + if (!m_receivedFormats.contains(mime_type)) { + m_receivedFormats << mime_type; + } } #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)