Commit 5ffe1058 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

do the sorting really only once after all sub-parts of the project are loaded

parent c5ea9136
...@@ -39,6 +39,12 @@ void KateProjectWorker::run() ...@@ -39,6 +39,12 @@ void KateProjectWorker::run()
KateProjectSharedQHashStringItem file2Item(new QHash<QString, KateProjectItem *>()); KateProjectSharedQHashStringItem file2Item(new QHash<QString, KateProjectItem *>());
loadProject(topLevel.data(), m_projectMap, file2Item.data()); loadProject(topLevel.data(), m_projectMap, file2Item.data());
/**
* sort the stuff once recursively, this is a LOT faster than once sorting the list
* as we have normally not all stuff in on level of directory
*/
topLevel->sortChildren(0);
/** /**
* create some local backup of some data we need for further processing! * create some local backup of some data we need for further processing!
*/ */
...@@ -214,12 +220,6 @@ void KateProjectWorker::loadFilesEntry(QStandardItem *parent, const QVariantMap ...@@ -214,12 +220,6 @@ void KateProjectWorker::loadFilesEntry(QStandardItem *parent, const QVariantMap
for (const auto &item : qAsConst(item2ParentPath)) { for (const auto &item : qAsConst(item2ParentPath)) {
item.second->appendRow(item.first); item.second->appendRow(item.first);
} }
/**
* sort the stuff once recursively, this is a LOT faster than once sorting the list
* as we have normally not all stuff in on level of directory
*/
parent->sortChildren(0);
} }
QStringList KateProjectWorker::findFiles(const QDir &dir, const QVariantMap &filesEntry) QStringList KateProjectWorker::findFiles(const QDir &dir, const QVariantMap &filesEntry)
......
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