diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-04-10 15:09:25 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-07-11 12:03:11 +0300 |
commit | f220368220abb11040fa944a853cda3d4f1fe84d (patch) | |
tree | 4ee137dc928732a5d048f55379c9b1e546dcc92e | |
parent | bd2f4164c6be0cc20af44c57b93f87c879c97729 (diff) |
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection.
Github-Pull: bitcoin-core/gui#277
Rebased-From: 7f3a5980c1d54988a707b961fd2ef647cebb4c5b
-rw-r--r-- | src/qt/guiutil.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index bab17562a6..cab015bdbe 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -734,8 +734,11 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; } void setClipboard(const QString& str) { - QApplication::clipboard()->setText(str, QClipboard::Clipboard); - QApplication::clipboard()->setText(str, QClipboard::Selection); + QClipboard* clipboard = QApplication::clipboard(); + clipboard->setText(str, QClipboard::Clipboard); + if (clipboard->supportsSelection()) { + clipboard->setText(str, QClipboard::Selection); + } } fs::path qstringToBoostPath(const QString &path) |