Merge pull request #1708 from NepNep21/windows-image-copying

Fix image copying on windows
pull/1717/head
DeepBlueV7.X 7 months ago committed by GitHub
commit 9f2f1c62de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      src/timeline/TimelineModel.cpp

@ -2034,7 +2034,11 @@ TimelineModel::copyMedia(const QString &eventId) const
clipContents->setImageData(img);
}
QGuiApplication::clipboard()->setMimeData(clipContents);
// 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);
});
return;
} catch (const std::exception &e) {

Loading…
Cancel
Save