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

LocationCompleterModel: Don't set tab position to view/search item

This commit is contained in:
David Rosca 2017-12-30 16:11:07 +01:00
parent 56b28bfa1f
commit 925e3496d9

View File

@ -141,7 +141,9 @@ void LocationCompleterModel::setTabPosition(QStandardItem* item) const
{
Q_ASSERT(item);
if (!qzSettings->showSwitchTab) {
item->setData(-1, TabPositionTabRole);
if (!qzSettings->showSwitchTab || item->data(VisitSearchItemRole).toBool()) {
return;
}
@ -159,10 +161,6 @@ void LocationCompleterModel::setTabPosition(QStandardItem* item) const
}
}
}
// Tab wasn't found
item->setData(QVariant::fromValue<void*>(static_cast<void*>(0)), TabPositionWindowRole);
item->setData(-1, TabPositionTabRole);
}
void LocationCompleterModel::refreshTabPositions() const