aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-10 15:09:25 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-10 21:34:38 +0300
commit7f3a5980c1d54988a707b961fd2ef647cebb4c5b (patch)
treeba76703dcc17bbba71d8747c438150520ed2bbbe /src/qt
parentf0fa32450ec35056b3e1025262aeaef4a24c35ee (diff)
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/guiutil.cpp7
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)