Remove StackedViewContainer class
ClosedPublic

Authored by tcanabrava on May 18 2018, 2:54 PM.

Details

Summary

StackedViewContainer is a plain view container with no navigiations.
It can be replaced using TabbedViewContainer and hiding the tabbar.
This will minimize duplicate code and allow easier control of code
in Konsole and KonsolePart.

Test Plan

Run konsole and konsole part test, and then
use the shortcuts to create tab.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tcanabrava created this revision.May 18 2018, 2:54 PM
Restricted Application added a project: Konsole. · View Herald TranscriptMay 18 2018, 2:54 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
tcanabrava requested review of this revision.May 18 2018, 2:54 PM
pedroarthurp added inline comments.
src/ViewManager.cpp
705

I would take this to a method:

if (tabbedNavigation()) {
    container->setTabBarVisible(true);
}

or

container->setTabBarVisible(tabbedNavigation());

If it is clear enough.

tcanabrava added inline comments.May 23 2018, 7:27 AM
src/ViewManager.cpp
705

I can't set it to "container->setTabBarVisible(tabbedNavigation());" as it would show the tabbar even when there's only one view, and that's not what konsole expects. also, I don't think a new method that only does a single boolean operation is really needed. :)

hindenburg retitled this revision from Remove StackView to Remove StackedViewContainer class.May 23 2018, 2:06 PM
hindenburg edited the summary of this revision. (Show Details)
hindenburg edited the test plan for this revision. (Show Details)
hindenburg accepted this revision.May 23 2018, 10:10 PM
This revision is now accepted and ready to land.May 23 2018, 10:10 PM
This revision was automatically updated to reflect the committed changes.