Commit 9252505f authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix a couple of inefficiencies in quickopen

1. We were refreshing the model twice!
2. Using set.insert() to check for duplicates is bad here as we
   keep growing in size..., use count() instead
parent 16161f87
......@@ -274,7 +274,7 @@ KateQuickOpen::KateQuickOpen(KateMainWindow *mainWindow)
setHidden(true);
slotListModeChanged(m_inputLine->listMode());
m_base_model->setListMode(m_inputLine->listMode());
// fill stuff
updateState();
......
......@@ -144,7 +144,7 @@ void KateQuickOpenModel::refresh(KateMainWindow *mainWindow)
for (const auto &filePath : projectDocs) {
// No duplicates
if (!openedDocUrls.insert(filePath).second) {
if (openedDocUrls.count(filePath) != 0) {
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment