Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/framework/ui/tests/navigationcontroller_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ class Ui_NavigationControllerTests : public ::testing::Test
Control* make_control(INavigation::Index& idx)
{
Control* c = new Control();

NavigationControl* navCtrl = new NavigationControl();
navCtrl->navigationController.set(m_controller);

navCtrl->setRow(idx.row);
navCtrl->setColumn(idx.column);
navCtrl->setOrder(idx.order());
Expand All @@ -126,8 +129,6 @@ class Ui_NavigationControllerTests : public ::testing::Test

setComponentWindow(navCtrl, &m_window);

navCtrl->navigationController.set(m_controller);

c->control = navCtrl;

return c;
Expand All @@ -138,6 +139,7 @@ class Ui_NavigationControllerTests : public ::testing::Test
Panel* p = new Panel();

NavigationPanel* navPanel = new NavigationPanel();
navPanel->navigationController.set(m_controller);

for (size_t ci = 0; ci < controlsCount; ++ci) {
INavigation::Index& idx = make_idx();
Expand All @@ -162,8 +164,6 @@ class Ui_NavigationControllerTests : public ::testing::Test

setComponentWindow(navPanel, &m_window);

navPanel->navigationController.set(m_controller);

p->panel = navPanel;

return p;
Expand All @@ -174,6 +174,8 @@ class Ui_NavigationControllerTests : public ::testing::Test
Section* s = new Section();

NavigationSection* navSection = new NavigationSection();
navSection->application.set(m_applicationMock);
navSection->navigationController.set(m_controller);

for (size_t pi = 0; pi < panelsCount; ++pi) {
Panel* p = make_panel(static_cast<int>(pi), controlsCount);
Expand All @@ -195,9 +197,6 @@ class Ui_NavigationControllerTests : public ::testing::Test
navSection->setOrder(idx.order());

setComponentWindow(navSection, &m_window);
navSection->application.set(m_applicationMock);

navSection->navigationController.set(m_controller);

s->section = navSection;

Expand Down
2 changes: 1 addition & 1 deletion src/framework/ui/view/navigationcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void NavigationControl::setPanel(NavigationPanel* panel)
connect(m_panel, &NavigationPanel::destroyed, this, &NavigationControl::onPanelDestroyed);

if (!isComponentCompleted()) {
AbstractNavigation::componentComplete();
componentComplete();
}
}

Expand Down
Loading