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.
  • Loading branch information
hebasto committed Apr 10, 2021
1 parent f0fa324 commit 7f3a598
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 @@ -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)
Expand Down

0 comments on commit 7f3a598

Please sign in to comment.