Prevent clipboard history and cloud sync on Windows

* Fix #2358
This commit is contained in:
Jonathan White 2020-12-20 10:59:35 -05:00
parent 60c2d89cb0
commit 4b5248ee98

View File

@ -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()) {