Skip to content

Commit

Permalink
Prevent clipboard history and cloud sync on Windows
Browse files Browse the repository at this point in the history
* Fix #2358
  • Loading branch information
droidmonkey committed Dec 21, 2020
1 parent 60c2d89 commit 4b5248e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ void Clipboard::setText(const QString& text, bool clear)
clipboard->setMimeData(mime, QClipboard::Clipboard);
#else
mime->setText(text);
#ifdef Q_OS_LINUX
mime->setData("x-kde-passwordManagerHint", QByteArrayLiteral("secret"));
#endif
#ifdef Q_OS_WIN
mime->setData("ExcludeClipboardContentFromMonitorProcessing", QByteArrayLiteral("1"));
#endif
clipboard->setMimeData(mime, QClipboard::Clipboard);

if (clipboard->supportsSelection()) {
Expand Down

0 comments on commit 4b5248e

Please sign in to comment.