Diffusion Kate d6e38c0cbd3d

Fix Duplicates on Quick Open File

Authored by tcanabrava on Oct 16 2018, 2:08 PM.

Description

Fix Duplicates on Quick Open File

Summary:
The logic on the quick open was overcomplex, and it led to
bugs while filling the document list.
The new logic fills a vector with all the files,
organizes them by Url, remove the files based on the
duplicated url's (so name matching doesn't matter) and only
then starts to populate the view.

I belive this is also faster than the old code as I minimized
the amount of memory allocations and deallocations.

I'm unsure about the use of QFileInfo in the end of the code as
we can have too many files there and creating a temporary
QFileInfo just to get the name is a huge overhead, we can do a split('/').last()
for the file name. I'll do some measurements with that.

Reviewers: cullmann, brauch, neundorf

Reviewed By: cullmann

Subscribers: gregormi, dhaumann, kwrite-devel

Tags: Kate

Differential Revision: https://phabricator.kde.org/D15804

Details

Committed
tcanabravaOct 17 2018, 10:01 AM
Reviewer
cullmann
Differential Revision
D15804: Fix Duplicates on Quick Open File
Parents
R40:e2ebc77065c2: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown