New Tabswitcher: Fix cut-off path strings
ClosedPublic

Authored by gregormi on Oct 15 2018, 12:56 AM.

Details

Summary

...and add GUI test program for testing the TabswitcherFilesModel.

The reason was, that the truncating function used the Kate document name which can be "README.md (2)" where the " (2)" is appended to the filename. In these cases 3 characters were cut-off too much (see https://phabricator.kde.org/D16054).

Diff Detail

Repository
R40 Kate
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gregormi created this revision.Oct 15 2018, 12:56 AM
Restricted Application added a project: Kate. · View Herald TranscriptOct 15 2018, 12:56 AM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
gregormi requested review of this revision.Oct 15 2018, 12:57 AM
gregormi edited the summary of this revision. (Show Details)Oct 15 2018, 1:02 AM
gregormi added a reviewer: Kate.
dhaumann accepted this revision.Oct 15 2018, 1:05 AM
dhaumann added subscribers: cullmann, dhaumann.

I would prefer that the contents of main.cpp goes to tstestapp.cpp, since this would allow to have multiple tests over time. But this can be done in a separate patch, please push.

@cullmann Does the CMakeLists.txt part look good to you?

This revision is now accepted and ready to land.Oct 15 2018, 1:05 AM
This revision was automatically updated to reflect the committed changes.

I would prefer that the contents of main.cpp goes to tstestapp.cpp, since this would allow to have multiple tests over time.

Good idea.

But this can be done in a separate patch, please push.

the patch for it: https://phabricator.kde.org/D16215