@ -71,6 +71,10 @@ void WebTabTest::parentChildTabsTest()
QCOMPARE(tab3.childTabs(), QVector<WebTab*>{&tab4});
QCOMPARE(tab4.parentTab(), &tab3);
tab3.addChildTab(&tab2);
QCOMPARE(tab3.childTabs(), (QVector<WebTab*>{&tab4, &tab2}));
QCOMPARE(tab1.childTabs(), (QVector<WebTab*>{&tab3, &tab5, &tab6}));
QTest::qWait(10);
}
@ -446,9 +446,8 @@ void WebTab::addChildTab(WebTab *tab, int index)
return;
tab->m_parentTab = this;
WebTab *tabParent = tab->m_parentTab;
if (tabParent) {
const int index = tabParent->m_childTabs.indexOf(tab);
if (index >= 0) {