Bug 198570

Summary: Opened file not inserted sorted into document list
Product: [Applications] kate Reporter: Chusslove Illich <caslav.ilic>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andresbajotierra
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Chusslove Illich 2009-07-01 21:28:22 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

When I've sorting order set to e.g. by URL or file, and open a file, instead
of it being inserted into proper place in document list, it gets just
appended to the end. Only when I open the next file, the previously opened
is reinserted properly.

Some sniffing around on my part:

In app/kateviewdocumentproxymodel.cpp, KateViewDocumentProxyModel::sort()
does get called when a file is opened, but the URL and file name for the
just opened file are empty at that point. So it sorts wrongly.

At the end of KateViewDocumentProxyModel::opened there is a commented out
call to sort(). If I uncomment it, the problem is solved, but then sorting
is performed twice on opening. (The call was commented out in
http://websvn.kde.org/?view=rev&revision=887760.)
Comment 1 Dario Andres 2009-08-17 19:17:48 UTC

*** This bug has been marked as a duplicate of bug 184055 ***