| 573 | } |
| 574 | |
| 575 | void Container::setCurrentWidget(QWidget* w) |
| 576 | { |
| 577 | Q_D(Container); |
| 578 | |
| 579 | if (d->stack->currentWidget() == w) { |
| 580 | return; |
| 581 | } |
| 582 | d->stack->setCurrentWidget(w); |
| 583 | d->tabBar->setCurrentIndex(d->stack->indexOf(w)); |
| 584 | if (View* view = viewForWidget(w)) |
| 585 | { |
| 586 | statusChanged(view); |
| 587 | if (!d->tabBar->isVisible()) |
| 588 | { |
| 589 | // repaint icon and document title only in tabbar-less mode |
| 590 | // tabbar will do repainting for us |
| 591 | statusIconChanged( view->document() ); |
| 592 | documentTitleChanged( view->document() ); |
| 593 | } |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | QWidget* Container::widget(int i) const |
| 598 | { |
no test coverage detected