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-04-10 21:34:38 +0300 |
commit | 7f3a5980c1d54988a707b961fd2ef647cebb4c5b (patch) | |
tree | ba76703dcc17bbba71d8747c438150520ed2bbbe /src | |
parent | f0fa32450ec35056b3e1025262aeaef4a24c35ee (diff) | |
download | bitcoin-7f3a5980c1d54988a707b961fd2ef647cebb4c5b.tar.xz |
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection.
Diffstat (limited to 'src')
-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 b4afdbcc22..a5d0f244ce 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -628,8 +628,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) |