1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Set m_ignoreCurrentChangedSignal to false directly after setCurrentIndex()

instead of in currentChanged().
This solves problems for the very first popup not triggering currentChanged(),
so in that case the first item did not set the completion url. As long as the
connection type to currentChanged() remains a DirectConnection, this fix should work.
This commit is contained in:
Franz Fellner 2012-12-09 08:15:21 +01:00
parent 251ab8af66
commit c36e59c31e

View File

@ -65,7 +65,6 @@ void LocationCompleter::showMostVisited()
void LocationCompleter::currentChanged(const QModelIndex &index) void LocationCompleter::currentChanged(const QModelIndex &index)
{ {
if (m_ignoreCurrentChangedSignal) { if (m_ignoreCurrentChangedSignal) {
m_ignoreCurrentChangedSignal = false;
return; return;
} }
@ -124,6 +123,7 @@ void LocationCompleter::adjustPopupSize()
s_view->resize(s_view->width(), popupHeight); s_view->resize(s_view->width(), popupHeight);
m_ignoreCurrentChangedSignal = true; m_ignoreCurrentChangedSignal = true;
s_view->setCurrentIndex(QModelIndex()); s_view->setCurrentIndex(QModelIndex());
m_ignoreCurrentChangedSignal = false;
s_view->show(); s_view->show();
m_originalText = m_locationBar->text(); m_originalText = m_locationBar->text();