SUMMARY STEPS TO REPRODUCE 1. Disable clipboard autoshare from pc. 2. Connect phone and pc. 3. Open KDE Connect pair new device screen on phone. 4. Disconnect pc from WiFi and wait until KDE Connect disappears from systray. 5. Copy some text. 6. Connect to WiFi and refresh pair new device screen on phone to reconnect. OBSERVED RESULT Clipboard is sent to phone. EXPECTED RESULT Clipboard not sent to phone. SOFTWARE/OS VERSIONS Phone: OnePlus Nord CE 2 Lite 5G Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.111.0 Qt Version: 5.15.11 ADDITIONAL INFORMATION
On the connection event, the current contents are unconditionally sent to the device: https://github.com/KDE/kdeconnect-kde/blob/69d6c172142dbec0db4251ecb0aa0ecc2d194193/plugins/clipboard/clipboardplugin.cpp#L74 On the changed event (post-connection), the autoshare and password preferences are checked before the contents are sent: https://github.com/KDE/kdeconnect-kde/blob/69d6c172142dbec0db4251ecb0aa0ecc2d194193/plugins/clipboard/clipboardplugin.cpp#L34
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/660
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/661
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-android/-/merge_requests/419
Git commit 642c99056837053d943aa04ebd6a487c25d2bd56 by Albert Vaca Cintora, on behalf of Marx Zhu. Committed on 31/03/2024 at 14:48. Pushed by albertvaka into branch 'master'. fix: do not send NetworkPacket if autoshare is disabled when connecting M +8 -1 plugins/clipboard/clipboardplugin.cpp https://invent.kde.org/network/kdeconnect-kde/-/commit/642c99056837053d943aa04ebd6a487c25d2bd56