Use QClipboard::supportsSelection instead of ifdefs
This commit is contained in:
parent
d4c99701b5
commit
cffa5e11d8
1 changed files with 2 additions and 3 deletions
|
|
@ -454,13 +454,12 @@ Text::StateResult FlatLabel::dragActionFinish(const QPoint &p, Qt::MouseButton b
|
|||
}
|
||||
}
|
||||
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
if (!_selection.empty()) {
|
||||
if (QGuiApplication::clipboard()->supportsSelection()
|
||||
&& !_selection.empty()) {
|
||||
TextUtilities::SetClipboardText(
|
||||
_text.toTextForMimeData(_selection),
|
||||
QClipboard::Selection);
|
||||
}
|
||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
||||
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue