Skip to content

Commit 7f3a598

Browse files
committed
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection.
1 parent f0fa324 commit 7f3a598

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/qt/guiutil.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,11 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; }
628628

629629
void setClipboard(const QString& str)
630630
{
631-
QApplication::clipboard()->setText(str, QClipboard::Clipboard);
632-
QApplication::clipboard()->setText(str, QClipboard::Selection);
631+
QClipboard* clipboard = QApplication::clipboard();
632+
clipboard->setText(str, QClipboard::Clipboard);
633+
if (clipboard->supportsSelection()) {
634+
clipboard->setText(str, QClipboard::Selection);
635+
}
633636
}
634637

635638
fs::path qstringToBoostPath(const QString &path)

0 commit comments

Comments
 (0)