Skip to content

Commit

Permalink
qt: Do not use QClipboard::Selection on Windows and macOS.
Browse files Browse the repository at this point in the history
Windows and macOS do not support the global mouse selection.

Github-Pull: bitcoin-core/gui#277
Rebased-From: 7f3a598
  • Loading branch information
hebasto committed Jul 11, 2021
1 parent bd2f416 commit f220368
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f220368

Please sign in to comment.