kde-open5 bug help needed

Andrea Scarpino scarpino at kde.org
Wed May 3 11:06:14 BST 2017


Hi all,

I hit a bug[1][2] in kde-open5 when using
QDesktopServices::openUrl(myUrl) to open the system browser.

The issue is that, since myUrl redirects to another page, kde-open5
(used under the hood by QDesktopServices because
XDG_CURRENT_DESKTOP=KDE is set) "fetches" the redirection url and then
open the browser at the redirected url; for my workflow this is bad
because myUrl generate a cookie and then you have no such cookie when
the browser starts.

I debugged the flow and I understood that since
redirectionHandlingEnabled is enabled by default, this[3] statement in
transferjob.cpp handles the redirection.
Then I disabled the redirection in krun.cpp[4] (invoked under the hood
by kde-open5), but this broke kde-open5 because it "never ends", but
instead waits for some event.
I suspect foundMimeType() should be call (which is triggered when
mimetype signal is emitted[5], but with
redirectionHandlingEnabled=false this switch case[6] is never
triggered and then mimetype signal isn't emit.

What should be the workflow without redirection? Any KIO hacker out there? :-)

I'm also on #kde-devel.

Thank you!

[1] https://bugs.kde.org/show_bug.cgi?id=354246
[2] https://bugs.kde.org/show_bug.cgi?id=364662
[3] https://cgit.kde.org/kio.git/tree/src/core/transferjob.cpp#n114
[4] https://cgit.kde.org/kio.git/tree/src/widgets/krun.cpp#n1147
[5] https://cgit.kde.org/kio.git/tree/src/widgets/krun.cpp#n1151
[6] https://cgit.kde.org/kio.git/tree/src/core/slaveinterface.cpp#n250

-- 
Andrea




More information about the kde-core-devel mailing list