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

[ComboTabBar] When removing tabs, don't use timer for enabling updates

Also fixed Show Site Info action in SiteInfoWidget
This commit is contained in:
nowrep 2014-03-13 11:11:52 +01:00
parent d109159408
commit 07cf7036df
3 changed files with 4 additions and 11 deletions

View File

@ -136,12 +136,11 @@ void ComboTabBar::removeTab(int index)
localTabBar(index)->removeTab(toLocalIndex(index));
updatePinnedTabBarVisibility();
tabRemoved(index);
setMinimumWidths();
// Enable updates with a small delay to prevent flickering
QTimer::singleShot(50, this, SLOT(enableUpdates()));
setUpdatesEnabled(true);
updateTabBars();
}
}
@ -302,12 +301,6 @@ void ComboTabBar::closeTabFromButton()
}
}
void ComboTabBar::enableUpdates()
{
setUpdatesEnabled(true);
updateTabBars();
}
void ComboTabBar::updateTabBars()
{
m_mainTabBar->update();

View File

@ -142,7 +142,6 @@ private slots:
void slotTabCloseRequested(int index);
void slotTabMoved(int from, int to);
void closeTabFromButton();
void enableUpdates();
void updateTabBars();
protected:

View File

@ -82,7 +82,8 @@ SiteInfoWidget::SiteInfoWidget(BrowserWindow* window, QWidget* parent)
ui->historyLabel->setText(tr("This is your <b>%1</b> visit of this site.").arg(text));
}
}
connect(ui->pushButton, SIGNAL(clicked()), m_window, SLOT(showPageInfo()));
connect(ui->pushButton, SIGNAL(clicked()), m_window->action(QSL("Tools/SiteInfo")), SLOT(trigger()));
}
SiteInfoWidget::~SiteInfoWidget()