Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kguiaddons for openSUSE:Factory 
checked in at 2023-01-16 17:58:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kguiaddons (Old)
 and      /work/SRC/openSUSE:Factory/.kguiaddons.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kguiaddons"

Mon Jan 16 17:58:13 2023 rev:110 rq:1058495 version:5.102.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kguiaddons/kguiaddons.changes    2022-12-12 
17:39:53.641238878 +0100
+++ /work/SRC/openSUSE:Factory/.kguiaddons.new.32243/kguiaddons.changes 
2023-01-16 18:00:11.519250171 +0100
@@ -1,0 +2,16 @@
+Thu Jan 12 08:18:49 UTC 2023 - Christophe Marin <[email protected]>
+
+- Update to 5.102.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.102.0
+- Changes since 5.101.0:
+  * waylandclipboard: Be a bit smarter about when to use the 
QGuiApplication::clipboard (kde#462979)
+  * Perform some initialization in initialization list
+  * Fix test on Windows
+  * KeySequenceRecorder: Allow modifier-only shortcuts
+  * KColorSchemeWatcherWin: Fix checking for dark mode
+  * Correct descriptions for CMake options WITH_WAYLAND and WITH_X11
+  * waylandclipboard: Update QClipboard when gaining focus (kde#442521)
+
+-------------------------------------------------------------------

Old:
----
  kguiaddons-5.101.0.tar.xz
  kguiaddons-5.101.0.tar.xz.sig

New:
----
  kguiaddons-5.102.0.tar.xz
  kguiaddons-5.102.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kguiaddons.spec ++++++
--- /var/tmp/diff_new_pack.HDzE4s/_old  2023-01-16 18:00:12.199253987 +0100
+++ /var/tmp/diff_new_pack.HDzE4s/_new  2023-01-16 18:00:12.203254009 +0100
@@ -17,7 +17,7 @@
 
 
 %define lname   libKF5GuiAddons5
-%define _tar_path 5.101
+%define _tar_path 5.102
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
@@ -25,7 +25,7 @@
 # Only needed for the package signature condition
 %bcond_without released
 Name:           kguiaddons
-Version:        5.101.0
+Version:        5.102.0
 Release:        0
 Summary:        Utilities for graphical user interfaces
 License:        LGPL-2.1-or-later


++++++ kguiaddons-5.101.0.tar.xz -> kguiaddons-5.102.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kguiaddons-5.101.0/CMakeLists.txt 
new/kguiaddons-5.102.0/CMakeLists.txt
--- old/kguiaddons-5.101.0/CMakeLists.txt       2022-12-03 10:46:43.000000000 
+0100
+++ new/kguiaddons-5.102.0/CMakeLists.txt       2023-01-07 01:27:56.000000000 
+0100
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "5.101.0") # handled by release scripts
+set(KF_VERSION "5.102.0") # handled by release scripts
 project(KGuiAddons VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.101.0  NO_MODULE)
+find_package(ECM 5.102.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -26,10 +26,10 @@
 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. 
Qt Assistant, Qt Creator & KDevelop)")
 
 if (UNIX AND NOT ANDROID AND NOT APPLE)
-    option(WITH_WAYLAND "Build with support for KeySequenceEditor inhibiting 
shortcuts on Wayland" ON)
+    option(WITH_WAYLAND "Build with support for KModifierKeyInfo, 
KSystemClipboard and KeySequenceRecorder inhibiting shortcuts on Wayland" ON)
     add_feature_info(WAYLAND ${WITH_WAYLAND} "KeySequenceEditor inhibiting 
shortcuts on Wayland")
 
-    option(WITH_X11 "Build with support for KeySequenceEditor inhibiting 
shortcuts on X11" ON)
+    option(WITH_X11 "Build with support for KModifierKeyInfo on X11" ON)
     add_feature_info(X11 ${WITH_X11} "KeySequenceEditor inhibiting shortcuts 
on X11")
 
     option(WITH_DBUS "Build with support for color scheme information via XDG 
portals" ON)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/autotests/keysequencerecordertest.cpp 
new/kguiaddons-5.102.0/autotests/keysequencerecordertest.cpp
--- old/kguiaddons-5.101.0/autotests/keysequencerecordertest.cpp        
2022-12-03 10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/autotests/keysequencerecordertest.cpp        
2023-01-07 01:27:56.000000000 +0100
@@ -123,7 +123,7 @@
     QCOMPARE(recorder.currentKeySequence(), QKeySequence());
 
     recorder.setModifierlessAllowed(true);
-    QTest::keyPress(m_window, Qt::Key_A);
+    QTest::keyClick(m_window, Qt::Key_A);
     QTest::qWait(800);
     QVERIFY(!recorder.isRecording());
     QCOMPARE(sequenceSpy.count(), 2);
@@ -131,6 +131,49 @@
     QCOMPARE(recorder.currentKeySequence(), QKeySequence(Qt::Key_A));
 }
 
+void KeySequenceRecorderTest::testModifierOnly()
+{
+    KeySequenceRecorder recorder(m_window);
+    recorder.setModifierOnlyAllowed(true);
+    recorder.setModifierlessAllowed(true);
+    QSignalSpy resultSpy(&recorder, &KeySequenceRecorder::gotKeySequence);
+    QSignalSpy recordingSpy(&recorder, &KeySequenceRecorder::recordingChanged);
+    QSignalSpy sequenceSpy(&recorder, 
&KeySequenceRecorder::currentKeySequenceChanged);
+
+    recorder.startRecording();
+    QVERIFY(recorder.isRecording());
+    QCOMPARE(sequenceSpy.count(), 1);
+
+    QTest::keyClick(m_window, Qt::Key_Shift);
+    recordingSpy.wait();
+    QVERIFY(!recorder.isRecording());
+    QCOMPARE(sequenceSpy.count(), 3);
+    QCOMPARE(resultSpy.count(), 1);
+    QCOMPARE(recorder.currentKeySequence(), QKeySequence(Qt::Key_Shift));
+}
+
+void KeySequenceRecorderTest::testModifierOnlyDisabled()
+{
+    KeySequenceRecorder recorder(m_window);
+    recorder.setModifierOnlyAllowed(false);
+    recorder.setModifierlessAllowed(true);
+    QSignalSpy resultSpy(&recorder, &KeySequenceRecorder::gotKeySequence);
+    QSignalSpy recordingSpy(&recorder, &KeySequenceRecorder::recordingChanged);
+    QSignalSpy sequenceSpy(&recorder, 
&KeySequenceRecorder::currentKeySequenceChanged);
+
+    recorder.startRecording();
+    QVERIFY(recorder.isRecording());
+    QCOMPARE(sequenceSpy.count(), 1);
+
+    QTest::keyClick(m_window, Qt::Key_Shift);
+    recordingSpy.wait();
+    QVERIFY(recorder.isRecording());
+    recorder.cancelRecording();
+    QCOMPARE(sequenceSpy.count(), 3);
+    QCOMPARE(resultSpy.count(), 0);
+    QCOMPARE(recorder.currentKeySequence(), QKeySequence());
+}
+
 void KeySequenceRecorderTest::testMultiKeyAllowed()
 {
     KeySequenceRecorder recorder(m_window);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/autotests/keysequencerecordertest.h 
new/kguiaddons-5.102.0/autotests/keysequencerecordertest.h
--- old/kguiaddons-5.101.0/autotests/keysequencerecordertest.h  2022-12-03 
10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/autotests/keysequencerecordertest.h  2023-01-07 
01:27:56.000000000 +0100
@@ -20,6 +20,8 @@
     void testRecording();
     void testModifiers();
     void testModifierless();
+    void testModifierOnly();
+    void testModifierOnlyDisabled();
     void testMultiKeyAllowed();
 
 private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kguiaddons-5.101.0/src/CMakeLists.txt 
new/kguiaddons-5.102.0/src/CMakeLists.txt
--- old/kguiaddons-5.101.0/src/CMakeLists.txt   2022-12-03 10:46:43.000000000 
+0100
+++ new/kguiaddons-5.102.0/src/CMakeLists.txt   2023-01-07 01:27:56.000000000 
+0100
@@ -80,6 +80,7 @@
                 
"${CMAKE_CURRENT_SOURCE_DIR}/recorder/keyboard-shortcuts-inhibit-unstable-v1.xml"
                 
"${CMAKE_CURRENT_SOURCE_DIR}/systemclipboard/wlr-data-control-unstable-v1.xml"
                 "${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml"
+                "${Wayland_DATADIR}/wayland.xml"
         )
     else()
         set(wayland_SRCS)
@@ -95,6 +96,10 @@
             PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml
             BASENAME keystate
         )
+        ecm_add_qtwayland_client_protocol(wayland_SRCS
+            PROTOCOL ${Wayland_DATADIR}/wayland.xml
+            BASENAME wayland
+        )
         target_sources(KF5GuiAddons PRIVATE
             ${wayland_SRCS}
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/src/colors/kcolorschemewatcher_win.cpp 
new/kguiaddons-5.102.0/src/colors/kcolorschemewatcher_win.cpp
--- old/kguiaddons-5.101.0/src/colors/kcolorschemewatcher_win.cpp       
2022-12-03 10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/colors/kcolorschemewatcher_win.cpp       
2023-01-07 01:27:56.000000000 +0100
@@ -16,7 +16,7 @@
 {
     QAbstractEventDispatcher::instance()->installNativeEventFilter(this);
 
-    m_preferDarkMode = 
!(m_settings.value(QStringLiteral("SystemUsesLightTheme")).value<bool>());
+    m_preferDarkMode = !(m_settings.value(QStringLiteral("AppsUseLightTheme"), 
true).value<bool>());
 }
 
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/src/recorder/keysequencerecorder.cpp 
new/kguiaddons-5.102.0/src/recorder/keysequencerecorder.cpp
--- old/kguiaddons-5.101.0/src/recorder/keysequencerecorder.cpp 2022-12-03 
10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/recorder/keysequencerecorder.cpp 2023-01-07 
01:27:56.000000000 +0100
@@ -60,6 +60,7 @@
     bool m_isRecording;
     bool m_multiKeyShortcutsAllowed;
     bool m_modifierlessAllowed;
+    bool m_modifierOnlyAllowed = false;
 
     Qt::KeyboardModifiers m_currentModifiers;
     QTimer m_modifierlessTimer;
@@ -387,14 +388,36 @@
 void KeySequenceRecorderPrivate::handleKeyRelease(QKeyEvent *event)
 {
     Qt::KeyboardModifiers modifiers = event->modifiers() & modifierMask;
+
+    /* The modifier release event (e.g. Qt::Key_Shift) also has the modifier
+       flag set so we were interpreting the "Shift" press as "Shift + Shift".
+       This function makes it so we just take the key part but not the modifier
+       if we are doing this one alone. */
+    const auto justKey = [&](Qt::KeyboardModifiers modifier) {
+        modifiers &= ~modifier;
+        if (m_currentKeySequence.isEmpty() && m_modifierOnlyAllowed) {
+            m_currentKeySequence = appendToSequence(m_currentKeySequence, 
event->key());
+        }
+    };
     switch (event->key()) {
     case -1:
         return;
     case Qt::Key_Super_L:
     case Qt::Key_Super_R:
-        // Qt doesn't properly recognize Super_L/Super_R as MetaModifier
-        modifiers &= ~Qt::MetaModifier;
+    case Qt::Key_Meta:
+        justKey(Qt::MetaModifier);
+        break;
+    case Qt::Key_Shift:
+        justKey(Qt::ShiftModifier);
+        break;
+    case Qt::Key_Control:
+        justKey(Qt::ControlModifier);
+        break;
+    case Qt::Key_Alt:
+        justKey(Qt::AltModifier);
+        break;
     }
+
     if ((modifiers & m_currentModifiers) < m_currentModifiers) {
         m_currentModifiers = modifiers;
         controlModifierlessTimeout();
@@ -557,4 +580,18 @@
     Q_EMIT modifierlessAllowedChanged();
 }
 
+bool KeySequenceRecorder::modifierOnlyAllowed() const
+{
+    return d->m_modifierOnlyAllowed;
+}
+
+void KeySequenceRecorder::setModifierOnlyAllowed(bool allowed)
+{
+    if (allowed == d->m_modifierOnlyAllowed) {
+        return;
+    }
+    d->m_modifierOnlyAllowed = allowed;
+    Q_EMIT modifierOnlyAllowedChanged();
+}
+
 #include "keysequencerecorder.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/src/recorder/keysequencerecorder.h 
new/kguiaddons-5.102.0/src/recorder/keysequencerecorder.h
--- old/kguiaddons-5.101.0/src/recorder/keysequencerecorder.h   2022-12-03 
10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/recorder/keysequencerecorder.h   2023-01-07 
01:27:56.000000000 +0100
@@ -79,6 +79,16 @@
      * @see QKeySequence
      */
     Q_PROPERTY(bool multiKeyShortcutsAllowed READ multiKeyShortcutsAllowed 
WRITE setMultiKeyShortcutsAllowed NOTIFY multiKeyShortcutsAllowedChanged)
+
+    /**
+     * It makes it acceptable for the key sequence to be just a modifier (e.g. 
Shift or Control)
+     *
+     * By default, if only a modifier is pressed and then released, the 
component will remain waiting for the sequence.
+     * When enabled, it will take the modifier key as the key sequence.
+     *
+     * By default this is `false`.
+     */
+    Q_PROPERTY(bool modifierOnlyAllowed READ modifierOnlyAllowed WRITE 
setModifierOnlyAllowed NOTIFY modifierOnlyAllowedChanged)
 public:
     /**
      * Constructor.
@@ -109,6 +119,9 @@
     void setModifierlessAllowed(bool allowed);
     bool modifierlessAllowed() const;
 
+    void setModifierOnlyAllowed(bool allowed);
+    bool modifierOnlyAllowed() const;
+
 public Q_SLOTS:
     /**
      * Stops the recording session
@@ -129,6 +142,7 @@
     void currentKeySequenceChanged();
     void multiKeyShortcutsAllowedChanged();
     void modifierlessAllowedChanged();
+    void modifierOnlyAllowedChanged();
 
 private:
     friend class KeySequenceRecorderPrivate;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/src/systemclipboard/waylandclipboard.cpp 
new/kguiaddons-5.102.0/src/systemclipboard/waylandclipboard.cpp
--- old/kguiaddons-5.101.0/src/systemclipboard/waylandclipboard.cpp     
2022-12-03 10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/systemclipboard/waylandclipboard.cpp     
2023-01-07 01:27:56.000000000 +0100
@@ -14,6 +14,7 @@
 #include <QImageWriter>
 #include <QMimeData>
 #include <QPointer>
+#include <QWindow>
 #include <QtWaylandClient/QWaylandClientExtension>
 #include <qpa/qplatformnativeinterface.h>
 #include <qtwaylandclientversion.h>
@@ -24,6 +25,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "qwayland-wayland.h"
 #include "qwayland-wlr-data-control-unstable-v1.h"
 
 static inline QString applicationQtXImageLiteral()
@@ -281,13 +283,16 @@
     DataControlSource() = default;
     ~DataControlSource()
     {
-        delete m_mimeData;
         destroy();
     }
 
     QMimeData *mimeData()
     {
-        return m_mimeData;
+        return m_mimeData.get();
+    }
+    std::unique_ptr<QMimeData> releaseMimeData()
+    {
+        return std::move(m_mimeData);
     }
 
 Q_SIGNALS:
@@ -298,7 +303,7 @@
     void zwlr_data_control_source_v1_cancelled() override;
 
 private:
-    QMimeData *m_mimeData;
+    std::unique_ptr<QMimeData> m_mimeData;
 };
 
 DataControlSource::DataControlSource(struct ::zwlr_data_control_source_v1 *id, 
QMimeData *mimeData)
@@ -449,6 +454,7 @@
 
     std::unique_ptr<DataControlSource> m_primarySelection; // selection set 
locally
     std::unique_ptr<DataControlOffer> m_receivedPrimarySelection; // latest 
selection set from externally to here
+    friend WaylandClipboard;
 };
 
 void DataControlDevice::setSelection(std::unique_ptr<DataControlSource> 
selection)
@@ -473,9 +479,82 @@
         Q_EMIT primarySelectionChanged();
     }
 }
+class Keyboard;
+// We are binding to Seat/Keyboard manually because we want to react to 
gaining focus but inside Qt the events are Qt and arrive to late
+class KeyboardFocusWatcher : public 
QWaylandClientExtensionTemplate<KeyboardFocusWatcher>, public QtWayland::wl_seat
+{
+    Q_OBJECT
+public:
+    KeyboardFocusWatcher()
+        : QWaylandClientExtensionTemplate(5)
+    {
+#if QTWAYLANDCLIENT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
+        initialize();
+#else
+        QMetaObject::invokeMethod(this, "addRegistryListener");
+#endif
+        auto native = qGuiApp->platformNativeInterface();
+        auto display = static_cast<struct ::wl_display 
*>(native->nativeResourceForIntegration("wl_display"));
+        // so we get capabilities
+        wl_display_roundtrip(display);
+    }
+    ~KeyboardFocusWatcher() override
+    {
+        if (isActive()) {
+            release();
+        }
+    }
+    void seat_capabilities(uint32_t capabilities) override
+    {
+        const bool hasKeyboard = capabilities & capability_keyboard;
+        if (hasKeyboard && !m_keyboard) {
+            m_keyboard = std::make_unique<Keyboard>(get_keyboard(), *this);
+        } else if (!hasKeyboard && m_keyboard) {
+            m_keyboard.reset();
+        }
+    }
+    bool hasFocus() const
+    {
+        return m_focus;
+    }
+Q_SIGNALS:
+    void keyboardEntered();
+
+private:
+    friend Keyboard;
+    bool m_focus = false;
+    std::unique_ptr<Keyboard> m_keyboard;
+};
+
+class Keyboard : public QtWayland::wl_keyboard
+{
+public:
+    Keyboard(::wl_keyboard *keyboard, KeyboardFocusWatcher &seat)
+        : wl_keyboard(keyboard)
+        , m_seat(seat)
+    {
+    }
+    ~Keyboard()
+    {
+        release();
+    }
+
+private:
+    void keyboard_enter([[maybe_unused]] uint32_t serial, [[maybe_unused]] 
wl_surface *surface, [[maybe_unused]] wl_array *keys) override
+    {
+        m_seat.m_focus = true;
+        Q_EMIT m_seat.keyboardEntered();
+    }
+    void keyboard_leave([[maybe_unused]] uint32_t serial, [[maybe_unused]] 
wl_surface *surface) override
+    {
+        m_seat.m_focus = false;
+    }
+    KeyboardFocusWatcher &m_seat;
+};
 
 WaylandClipboard::WaylandClipboard(QObject *parent)
     : KSystemClipboard(parent)
+    , m_keyboardFocusWatcher(new KeyboardFocusWatcher)
     , m_manager(new DataControlDeviceManager)
 {
     connect(m_manager.get(), &DataControlDeviceManager::activeChanged, this, 
[this]() {
@@ -488,7 +567,6 @@
             if (!seat) {
                 return;
             }
-
             m_device.reset(new 
DataControlDevice(m_manager->get_data_device(seat)));
 
             connect(m_device.get(), 
&DataControlDevice::receivedSelectionChanged, this, [this]() {
@@ -531,6 +609,14 @@
     if (!m_device) {
         return;
     }
+    // If the application is focused, use the normal mechanism so a future 
paste will not deadlock itself
+    // On enter Qt delays processing of the enter event but when a window is 
hidden the leave event arrives after hiding the window
+    if (const auto fw = QGuiApplication::focusWindow(); (fw && 
fw->isVisible()) || (!fw && m_keyboardFocusWatcher->hasFocus())) {
+        QGuiApplication::clipboard()->setMimeData(mime, mode);
+        return;
+    }
+    // If not, set the clipboard once the app receives focus to avoid the 
deadlock
+    connect(m_keyboardFocusWatcher.get(), 
&KeyboardFocusWatcher::keyboardEntered, this, &WaylandClipboard::gainedFocus, 
Qt::UniqueConnection);
     auto source = 
std::make_unique<DataControlSource>(m_manager->create_data_source(), mime);
     if (mode == QClipboard::Clipboard) {
         m_device->setSelection(std::move(source));
@@ -539,6 +625,22 @@
     }
 }
 
+void WaylandClipboard::gainedFocus()
+{
+    disconnect(m_keyboardFocusWatcher.get(), 
&KeyboardFocusWatcher::keyboardEntered, this, nullptr);
+    // QClipboard takes ownership of the QMimeData so we need to transfer and 
unset our selections
+    if (auto &selection = m_device->m_selection) {
+        std::unique_ptr<QMimeData> data = selection->releaseMimeData();
+        WaylandClipboard::clear(QClipboard::Clipboard);
+        QGuiApplication::clipboard()->setMimeData(data.release(), 
QClipboard::Clipboard);
+    }
+    if (auto &primarySelection = m_device->m_primarySelection) {
+        std::unique_ptr<QMimeData> data = primarySelection->releaseMimeData();
+        WaylandClipboard::clear(QClipboard::Selection);
+        QGuiApplication::clipboard()->setMimeData(data.release(), 
QClipboard::Selection);
+    }
+}
+
 void WaylandClipboard::clear(QClipboard::Mode mode)
 {
     if (!m_device) {
@@ -546,9 +648,11 @@
     }
     if (mode == QClipboard::Clipboard) {
         m_device->set_selection(nullptr);
+        m_device->m_selection.reset();
     } else if (mode == QClipboard::Selection) {
         if (zwlr_data_control_device_v1_get_version(m_device->object()) >= 
ZWLR_DATA_CONTROL_DEVICE_V1_SET_PRIMARY_SELECTION_SINCE_VERSION) {
             m_device->set_primary_selection(nullptr);
+            m_device->m_primarySelection.reset();
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/src/systemclipboard/waylandclipboard_p.h 
new/kguiaddons-5.102.0/src/systemclipboard/waylandclipboard_p.h
--- old/kguiaddons-5.101.0/src/systemclipboard/waylandclipboard_p.h     
2022-12-03 10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/systemclipboard/waylandclipboard_p.h     
2023-01-07 01:27:56.000000000 +0100
@@ -13,6 +13,7 @@
 
 class DataControlDevice;
 class DataControlDeviceManager;
+class KeyboardFocusWatcher;
 
 class WaylandClipboard : public KSystemClipboard
 {
@@ -26,6 +27,8 @@
     bool isValid();
 
 private:
+    void gainedFocus();
+    std::unique_ptr<KeyboardFocusWatcher> m_keyboardFocusWatcher;
     std::unique_ptr<DataControlDeviceManager> m_manager;
     std::unique_ptr<DataControlDevice> m_device;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kguiaddons-5.101.0/src/util/kiconutils.cpp 
new/kguiaddons-5.102.0/src/util/kiconutils.cpp
--- old/kguiaddons-5.101.0/src/util/kiconutils.cpp      2022-12-03 
10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/util/kiconutils.cpp      2023-01-07 
01:27:56.000000000 +0100
@@ -36,16 +36,16 @@
 
 KOverlayIconEngine::KOverlayIconEngine(const QIcon &icon, const QIcon 
&overlay, Qt::Corner position)
     : QIconEngine()
+    , m_base(icon)
 {
-    m_base = icon;
     m_overlays.insert(position, overlay);
 }
 
 KOverlayIconEngine::KOverlayIconEngine(const QIcon &icon, const 
QHash<Qt::Corner, QIcon> &overlays)
     : QIconEngine()
+    , m_base(icon)
+    , m_overlays(overlays)
 {
-    m_base = icon;
-    m_overlays = overlays;
 }
 
 KOverlayIconEngine::KOverlayIconEngine(const QIcon &icon, const QStringList 
&overlays)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kguiaddons-5.101.0/src/util/kmodifierkeyinfoprovider_xcb.cpp 
new/kguiaddons-5.102.0/src/util/kmodifierkeyinfoprovider_xcb.cpp
--- old/kguiaddons-5.101.0/src/util/kmodifierkeyinfoprovider_xcb.cpp    
2022-12-03 10:46:43.000000000 +0100
+++ new/kguiaddons-5.102.0/src/util/kmodifierkeyinfoprovider_xcb.cpp    
2023-01-07 01:27:56.000000000 +0100
@@ -21,11 +21,11 @@
 
 struct ModifierDefinition {
     ModifierDefinition(Qt::Key _key, unsigned int _mask, const char *_name, 
KeySym _keysym)
+        : key(_key)
+        , mask(_mask)
+        , name(_name)
+        , keysym(_keysym)
     {
-        key = _key;
-        mask = _mask;
-        name = _name;
-        keysym = _keysym;
     }
     Qt::Key key;
     unsigned int mask;

Reply via email to