File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 22
33## 25.10.0
44
5+ - There now is a new menu action and tray icon action to **send the clipboard**
6+ content via the QOwnNotes web application to **another instance of QOwnNotes**
7+ (for [#3371](https://github.com/pbek/QOwnNotes/issues/3371))
8+ - You need to set the same security token in both instances to be able to
9+ send clipboard content
510- A tooltip for the tray icon was added
611- A crash on wayland was fixed when a global shortcut was set
712
Original file line number Diff line number Diff line change 2222#include < utils/misc.h>
2323
2424#include < QApplication>
25+ #include < QBuffer>
2526#include < QClipboard>
2627#include < QJsonDocument>
2728#include < QSslError>
@@ -69,6 +70,11 @@ void WebAppClientService::close() {
6970 _url = " " ;
7071}
7172
73+ /* *
74+ * Keeps the current clipboard content
75+ *
76+ * @return true if something was kept
77+ */
7278bool WebAppClientService::keepClipboard () {
7379 QClipboard *clipboard = QApplication::clipboard ();
7480 const QMimeData *mimeData = clipboard->mimeData ();
@@ -83,7 +89,6 @@ bool WebAppClientService::keepClipboard() {
8389 _clipboardMimeType = " image/png" ;
8490 _clipboardContent = content;
8591 } else if (mimeData->hasText ()) {
86- qDebug () << __func__ << " clipboard->text(): " << clipboard->text ();
8792 _clipboardMimeType = " text/plain" ;
8893 _clipboardContent = clipboard->text ();
8994 } else if (mimeData->hasHtml ()) {
@@ -110,9 +115,9 @@ void WebAppClientService::initClipboardService() {
110115
111116 // React to clipboard changes
112117 connect (clipboard, &QClipboard::dataChanged, [this ]() {
113- // We need to store the clipboard ourselves to preserve external clipboard changes
118+ // We need to store the clipboard ourselves to preserve external clipboard changes we would
119+ // not catch otherwise
114120 keepClipboard ();
115- // sendClipboard();
116121 });
117122}
118123
You can’t perform that action at this time.
0 commit comments