mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
Merge pull request #1708 from NepNep21/windows-image-copying
Fix image copying on windows
This commit is contained in:
commit
9f2f1c62de
1 changed files with 5 additions and 1 deletions
|
@ -2034,7 +2034,11 @@ TimelineModel::copyMedia(const QString &eventId) const
|
||||||
clipContents->setImageData(img);
|
clipContents->setImageData(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Qt uses COM for clipboard management on windows and our HTTP threads do not
|
||||||
|
// initialize it, so run in the event loop
|
||||||
|
QTimer::singleShot(0, ChatPage::instance(), [clipContents] {
|
||||||
QGuiApplication::clipboard()->setMimeData(clipContents);
|
QGuiApplication::clipboard()->setMimeData(clipContents);
|
||||||
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
|
|
Loading…
Reference in a new issue