Fixes a regression introduced by 6af0dad2eeba.
DolphinViewContainer::setActive() unconditionally calls setActive() on
the url navigator, view and search box. However this has side effects,
as DolphinSearchBox activates itself if it receives a FocusIn event.
This is what happens in the bug:
- The searchbox of the first tab gets disactivated (as side effect of disactivating its container).
- Second tab gets closed, we call removeTab(1) in the tab widget.
- The searchbox of the first tab gets a FocusIn event and calls setActive(true).
- Since it was disactivated, it emits activated() and this results in the activeViewChanged() signal which causes the crash, because the currentIndex() of the tab page is still 1 but its widget has already been invalidated.
This patch temporarily delays the activation of the search box, so that
we are sure that activeViewChanged() is emitted only after the tab has
been properly removed.
BUG: 379135
FIXED-IN: 17.04.2