mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
17 lines
342 B
C++
17 lines
342 B
C++
|
#include "util/Clipboard.hpp"
|
||
|
#include <QApplication>
|
||
|
|
||
|
namespace chatterino {
|
||
|
|
||
|
void crossPlatformCopy(const QString &text)
|
||
|
{
|
||
|
auto clipboard = QApplication::clipboard();
|
||
|
clipboard->setText(text);
|
||
|
if (clipboard->supportsSelection())
|
||
|
{
|
||
|
clipboard->setText(text, QClipboard::Selection);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
} // namespace chatterino
|