MCPcopy Create free account
hub / github.com/KDE/kdevelop / removeWidget

Method removeWidget

kdevplatform/sublime/container.cpp:611–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609}
610
611void Container::removeWidget(QWidget *w)
612{
613 Q_D(Container);
614
615 Q_ASSERT(w);
616
617 int widgetIdx = d->stack->indexOf(w);
618 d->stack->removeWidget(w);
619 d->tabBar->removeTab(widgetIdx);
620 if (d->tabBar->currentIndex() != -1 && !d->tabBar->isVisible()) {
621 // repaint icon and document title only in tabbar-less mode
622 // tabbar will do repainting for us
623 View* view = currentView();
624 if( view ) {
625 statusIconChanged( view->document() );
626 documentTitleChanged( view->document() );
627 }
628 }
629 View* view = d->viewForWidget.take(w);
630 if (view)
631 {
632 disconnect(view->document(), &Document::titleChanged, this, &Container::documentTitleChanged);
633 disconnect(view->document(), &Document::statusIconChanged, this, &Container::statusIconChanged);
634 disconnect(view, &View::statusChanged, this, &Container::statusChanged);
635
636 // Update document list context menu
637 Q_ASSERT(d->documentListActionForView.contains(view));
638 delete d->documentListActionForView.take(view);
639 }
640}
641
642bool Container::hasWidget(QWidget* w) const
643{

Callers 12

selectionChangedMethod · 0.80
slotItemCompletedMethod · 0.80
aboutToRemoveViewMethod · 0.80
applyOrderToLayoutMethod · 0.80
tabMovedMethod · 0.80
~ViewBarContainerMethod · 0.80
removeViewBarMethod · 0.80
updateMethod · 0.80
resizeEventMethod · 0.80
fillEditFromPatchMethod · 0.80
removeOutputMethod · 0.80

Calls 4

indexOfMethod · 0.45
currentIndexMethod · 0.45
documentMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected