mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 07:35:12 +00:00
Fix pasting images from Firefox on Windows.
Fixes #10564. Together with the image data Firefox sets to the clipboard an URLs list which has a path to local temp file, created from that image. Reading images from disk is slower + sometimes the content of the file is wrong so for this case we prefer to read the image data directly.
This commit is contained in:
@@ -38,18 +38,6 @@ inline bool in_range(Value &&value, From &&from, Till &&till) {
|
||||
return (value >= from) && (value < till);
|
||||
}
|
||||
|
||||
#if __has_include(<kurlmimedata.h>)
|
||||
inline QList<QUrl> GetMimeUrls(const QMimeData *data) {
|
||||
if (!data->hasUrls()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return KUrlMimeData::urlsFromMimeData(
|
||||
data,
|
||||
KUrlMimeData::PreferLocalUrls);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __has_include(<ksandbox.h>)
|
||||
inline QString IconName() {
|
||||
static const auto Result = KSandbox::isFlatpak()
|
||||
|
Reference in New Issue
Block a user