Skip to content

Commit

Permalink
Normalizing clipboard access accross platforms
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Chamberland <[email protected]>
  • Loading branch information
chxmberland committed Jul 30, 2024
1 parent cf90c33 commit d416dca
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/lib/app/RvCommon/RvApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1454,18 +1454,7 @@ RvApplication::pasteTextFromClipboard()
{
QString text;
QClipboard *clipboard = QApplication::clipboard();

#if defined(PLATFORM_DARWIN)
text = clipboard->text(QClipboard::Clipboard);
#elif defined(PLATFORM_WINDOWS)
text = clipboard->text(QClipboard::Clipboard);
#else
text = clipboard->text(QClipboard::Selection);
if (text.isEmpty()) {
text = clipboard->text(QClipboard::Clipboard);
}
#endif

text = clipboard->text(QClipboard::Clipboard);
return text.toUtf8().constData();
}

Expand Down

0 comments on commit d416dca

Please sign in to comment.