mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 20:09:37 +00:00
feat: get text from the clipboard
This commit is contained in:
parent
b84216490c
commit
fd4971b91d
@ -82,6 +82,8 @@ DOS_API void dos_qguiapplication_installEventFilter(DosEvent *vptr);
|
||||
|
||||
DOS_API void dos_qguiapplication_clipboard_setText(const char* text);
|
||||
|
||||
DOS_API char* dos_qguiapplication_clipboard_getText();
|
||||
|
||||
DOS_API void dos_qguiapplication_clipboard_setImage(const char *text);
|
||||
|
||||
DOS_API void dos_qguiapplication_clipboard_setImageByUrl(const char *url);
|
||||
|
6
vendor/DOtherSide/lib/src/DOtherSide.cpp
vendored
6
vendor/DOtherSide/lib/src/DOtherSide.cpp
vendored
@ -182,6 +182,12 @@ void dos_qguiapplication_clipboard_setText(const char* text)
|
||||
QGuiApplication::clipboard()->setText(text);
|
||||
}
|
||||
|
||||
char* dos_qguiapplication_clipboard_getText()
|
||||
{
|
||||
auto clipboardText = QGuiApplication::clipboard()->text();
|
||||
return convert_to_cstring(clipboardText);
|
||||
}
|
||||
|
||||
void dos_qguiapplication_clipboard_setImage(const char* text)
|
||||
{
|
||||
QByteArray btArray = QString(text).split("base64,")[1].toUtf8();
|
||||
|
Loading…
x
Reference in New Issue
Block a user