Some fixes related to clipboard (#2405)
Also: - Fixed capitalization of one method in `LoginDialog.cpp` - Visually improved some strings in `LoginDialog.cpp` - Added utility function getting clipboard content to `Clipboard.cpp` - Made sure to use `crossPlatformCopy` in `UserInfoPopup.cpp`
This commit is contained in:
@@ -6,11 +6,18 @@ namespace chatterino {
|
||||
void crossPlatformCopy(const QString &text)
|
||||
{
|
||||
auto clipboard = QApplication::clipboard();
|
||||
|
||||
clipboard->setText(text);
|
||||
|
||||
if (clipboard->supportsSelection())
|
||||
{
|
||||
clipboard->setText(text, QClipboard::Selection);
|
||||
}
|
||||
}
|
||||
|
||||
QString getClipboardText()
|
||||
{
|
||||
return QApplication::clipboard()->text();
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user