Bug 460314 - Not work drag and drop to Telegram (flatpack)
Summary: Not work drag and drop to Telegram (flatpack)
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kcoreaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
: 463586 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-12 14:33 UTC by Anton K
Modified: 2023-01-26 15:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton K 2022-10-12 14:33:53 UTC
SUMMARY
when dragging an image to telegram - only the first image is dragged, the subsequent ones are replaced by the first one
Short demo: https://youtu.be/GGXxxXKsAPA

STEPS TO REPRODUCE
1.  Open image in gwenview
2.  Drag&drop first image to Telegram message
3. .  Drag&drop second (other) image to Telegram message

OBSERVED RESULT
To send, we receive by giving the same images (first)

EXPECTED RESULT
Get different images according to drag and drop to send to telegram

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Graphics Platform: X11

flatpak org.telegram.desktop:    4.2.4

ADDITIONAL INFORMATION

It used to work fine, the error appeared some time ago (maybe in the fall), I don’t know the exact version. I'm sorry, but I don't know if it's related to Gwenview or Telegram or something, but through Dolphin everything works correctly
Comment 1 Aleksandr Beliaev 2022-10-15 05:50:41 UTC
I can confirm the bug is not related to flatpak. I've got gwenview and telegram-desktop both installed from official Arch repos:

community/telegram-desktop 4.2.4-1 [installed]
extra/gwenview 22.08.2-1 (kde-applications kde-graphics) [installed]

...and see exactly the same symptoms - only the first image is dropped to Telegram. 

P.S. Some more observations: sequential images are copied OK if I use Copy-Paste menus i.e click RMB->Copy in Gwenview then RMB->Paste in Telegram window, or drag'n'drop image from gwenview to other application (GIMP), or drag'n'drop image from other viewer (e.g. DigiKam) to Telegram.
Comment 2 Aleksandr Beliaev 2022-10-15 06:27:03 UTC
(In reply to Aleksandr Beliaev from comment #1)
> I can confirm the bug is not related to flatpak. I've got gwenview and
> telegram-desktop both installed from official Arch repos:
> 
> community/telegram-desktop 4.2.4-1 [installed]
> extra/gwenview 22.08.2-1 (kde-applications kde-graphics) [installed]
> 
> ...and see exactly the same symptoms - only the first image is dropped to
> Telegram. 
> 
> P.S. Some more observations: sequential images are copied OK if I use
> Copy-Paste menus i.e click RMB->Copy in Gwenview then RMB->Paste in Telegram
> window, or drag'n'drop image from gwenview to other application (GIMP), or
> drag'n'drop image from other viewer (e.g. DigiKam) to Telegram.

UPD: After downgrading telegram-desktop to 4.2.1 d'n'd from gwenview started working as intended. There is a small chance this is a Telegram issue. On the other hand, other applications (I've tried a dozen different programs including Dolphin, DigiKam, GIMP) work with new Telegram version properly.
Comment 3 Ilya Fedin 2022-11-20 20:20:47 UTC
This is a bug in kcoreaddons (that is used by Telegram) and it will be way more widespread after KDE Gear 22.12 release. I submitted the fix long time ago, sadly no one approved it.

https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/267
Comment 4 Nicolas Fella 2022-12-15 12:51:42 UTC
Git commit 4f35c8d723e85e4a83eb23df28691f68b639ab35 by Nicolas Fella, on behalf of Ilya Fedin.
Committed on 15/12/2022 at 12:51.
Pushed by nicolasfella into branch 'master'.

Fix portal urls cache on X11

When I was reading QPA code at first, I was thinking that windows and
cocoa QPAs have a QMimeData for all the run time, while xcb and wayland
create them on every owner change. It seems I've misread the xcb code
as the portal cache bugs on it now.

This changes the cache to use the last transfer ID that should make it
unaware of the implementation detail while still allowing the consumer
to get portal urls until another file is copied.

M  +7    -9    src/lib/io/kurlmimedata.cpp

https://invent.kde.org/frameworks/kcoreaddons/commit/4f35c8d723e85e4a83eb23df28691f68b639ab35
Comment 5 Harald Sitter 2023-01-26 15:14:07 UTC
*** Bug 463586 has been marked as a duplicate of this bug. ***