Bug 425163 - Kate is spewing kf5.kio.kdirmodel: protocol mismatch: "" vs "file"
Summary: Kate is spewing kf5.kio.kdirmodel: protocol mismatch: "" vs "file"
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.73.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-09 15:12 UTC by Andreas Nordal
Modified: 2020-09-20 20:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.75
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Nordal 2020-08-09 15:12:46 UTC
SUMMARY
Annoying error message in the terminal.

STEPS TO REPRODUCE
touch file.txt && kate file.txt

OBSERVED RESULT
kf5.kio.kdirmodel: protocol mismatch: "" vs "file"

EXPECTED RESULT


SOFTWARE/OS VERSIONS
kate 20.04.3
openSUSE Tumbleweed 20200807

KDE Plasma Version: 5.19
KDE Frameworks Version: 5.72.0
Qt Version: 5.15

ADDITIONAL INFORMATION
Kwrite does not suffer from this.
Comment 1 KC 2020-08-14 05:39:56 UTC
Same thing on Arch Linux, with Kate 20.04.3.
Comment 2 Bug Janitor Service 2020-09-18 10:43:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/140
Comment 3 David Faure 2020-09-20 20:06:15 UTC
Git commit 17508a45e1688c68d3855006dbba254dbb707c09 by David Faure, on behalf of Ahmad Samir.
Committed on 20/09/2020 at 20:05.
Pushed by dfaure into branch 'master'.

KDirOperator: don't call setCurrentItem on an empty url

A previous commit re-enabled dir highlighting, which is supposed to
highlight the dir we've just left when going back/up. However when a
KFileWidget is first created/opened there is no such item to highlight.
If setCurrentItem is called with on an empty url, KDirModel::expandToUrl
would call expandAllParentsUntil on that url which would show this warning:
'protocol mismatch: "" vs "file"'.

This also fixes an issue where if you open a file in kate, then invoke the
open file dialog the currently open file isn't selected/highlighted in the
view.
FIXED-IN: 5.75

M  +2    -1    src/filewidgets/kdiroperator.cpp

https://invent.kde.org/frameworks/kio/commit/17508a45e1688c68d3855006dbba254dbb707c09