1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

TabWidget: Correctly emit tabRemoved when detaching tab

This commit is contained in:
David Rosca 2018-01-31 20:20:25 +01:00
parent 43e472e50e
commit ebaab19f88
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -651,7 +651,12 @@ void TabWidget::detachTab(WebTab* tab)
disconnect(tab->webView(), SIGNAL(urlChanged(QUrl)), this, SIGNAL(changed()));
disconnect(tab->webView(), SIGNAL(ipChanged(QString)), m_window->ipLabel(), SLOT(setText(QString)));
const int index = tab->tabIndex();
tab->detach();
tab->setPinned(false);
emit tabRemoved(index);
if (count() == 0) {
m_window->close();
@ -668,7 +673,6 @@ void TabWidget::detachTab(int index)
}
detachTab(tab);
tab->setPinned(false);
BrowserWindow* window = mApp->createWindow(Qz::BW_NewWindow);
window->setStartTab(tab);