Some refactoring: removed classes by merging code + removing code redundancy
ClosedPublic

Authored by abika on Jul 25 2016, 3:50 PM.

Details

Summary

Yes, code and class diagram style is a matter of taste. But I think removing unnecessary code makes debugging and improvement a lot easier.
Specially because there is not that much active development going on and we want a working application for the next 10 years when porting to Qt7/Kf7 has to be done .)

Commits:

Refactoring: Removed KrInterViewItem class

KrInterViewItem was minimal implementation of abstract class KrViewItem.
Implementation moved to base class.

Refactoring: merged KrItemView with its single subclass KrInterBriefView

+ wheelEvent() in KrItemView was never used.

Simplify and remove duplicate code in Krusader::queryClose()

Refactoring: merged KrMainWindow interface with its single (abstract) subclass FileManagerWindow

Removed FileManagerWindow and moved all declarations to KrMainWindow which is a parent of the Krusader class, so it is already complicated enough.
And krmainwindow.cpp was unused for the last six years.

Test Plan

Used for some days now. Tested file selection in both view types.

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
abika updated this revision to Diff 5495.Jul 25 2016, 3:50 PM
abika retitled this revision from to Some refactoring: removed classes by merging code + removing code redundancy.
abika updated this object.
abika edited the test plan for this revision. (Show Details)
abika added a reviewer: Krusader.
asensi accepted this revision.Jul 31 2016, 9:12 PM
asensi added a reviewer: asensi.
asensi added a subscriber: asensi.

The code gets compiled using Kubuntu 16.04 and seems to work correctly :-)

This revision is now accepted and ready to land.Jul 31 2016, 9:12 PM
Closed by commit R167:4f364ef511d7: Some refactoring: removed classes by merging code + removing code redundancy (authored by Alexander Bikadorov <bikaejkb@mailbox.tu-berlin.de>). · Explain WhyAug 1 2016, 7:04 PM
This revision was automatically updated to reflect the committed changes.