The krunner appstream plugin correctly gives matches, but clicking them does nothing. My custom logging shows that it reaches QDesktopServices::openUrl() and that it returns success, yet nothing happens. STEPS TO REPRODUCE 1. Search Chromium 2. Click "Get Chromium Web Browser..." OBSERVED RESULT Nothing EXPECTED RESULT Discover starts and shows the application page SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Fedora Rawhide KDE (available in About System) KDE Plasma Version: 5.91.0 KDE Frameworks Version: 5.247.0 Qt Version: 6.6.1 ADDITIONAL INFORMATION `xdg-open appstream://foo` works Writing a minimal QtGuiApplication that calls `QDesktopServices::openUrl(QUrl("appstream://foo"))` works
*** This bug has been marked as a duplicate of bug 472300 ***
Not the same bug; see ADDITIONAL INFORMATION But i presume you cannot reproduce?
Ah, I missed that part, sorry. I can reproduce the issue; I was simply assuming it was another manifestation of https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/67.
I know what's going on. QGenericUnixServices::openUrl requests an xdg-activation token before it calls xdg-open. In the time between the token being requested and arriving the kickoff/krunner window closes and the Qt window object is destroyed. This causes the connect in https://invent.kde.org/qt/qt/qtbase/-/blob/dev/src/gui/platform/unix/qgenericunixservices.cpp#L439 to disconnect and the slot (that ends up calling xdg-open) is never called. I'm fairly sure this worked at some point, and the relevant code didn't really change, so not sure what triggers it
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3822
Git commit 64ae1699f6b4b55cbbc3e71b8d3b42a56582dbb8 by Alexander Lohnau, on behalf of Nicolas Fella. Committed on 25/01/2024 at 06:45. Pushed by alex into branch 'master'. [runners/appstream] Use KIO::OpenUrlJob instead of QDesktopServices::openUrl M +1 -1 runners/appstream/CMakeLists.txt M +6 -2 runners/appstream/appstreamrunner.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/64ae1699f6b4b55cbbc3e71b8d3b42a56582dbb8
Git commit b9be19c007edc20716fcc8ab2c6bc453be566a29 by Alexander Lohnau, on behalf of Nicolas Fella. Committed on 25/01/2024 at 18:19. Pushed by alex into branch 'Plasma/6.0'. [runners/appstream] Use KIO::OpenUrlJob instead of QDesktopServices::openUrl (cherry picked from commit 64ae1699f6b4b55cbbc3e71b8d3b42a56582dbb8) M +1 -1 runners/appstream/CMakeLists.txt M +6 -2 runners/appstream/appstreamrunner.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/b9be19c007edc20716fcc8ab2c6bc453be566a29