2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Decrease the amount of clipboard data retrievation

This commit is contained in:
Ilya Fedin
2022-09-26 02:52:59 +04:00
committed by John Preston
parent 073c1a4d0f
commit 16669402cf
3 changed files with 17 additions and 18 deletions

View File

@@ -39,15 +39,17 @@ inline bool in_range(Value &&value, From &&from, Till &&till) {
return (value >= from) && (value < till);
}
inline auto GetMimeUrls(const QMimeData *data) {
#if __has_include(<KUrlMimeData>)
inline QList<QUrl> GetMimeUrls(const QMimeData *data) {
if (!data->hasUrls()) {
return {};
}
return KUrlMimeData::urlsFromMimeData(
data,
KUrlMimeData::PreferLocalUrls);
#else
return data->urls();
#endif
}
#endif
#if __has_include(<KSandbox>) && defined DeclareReadSetting
inline QString FlatpakID() {