plugin/fsm: sort dirs first
This commit is contained in:
parent
2a5a24c51f
commit
f8dc3f2b38
1 changed files with 3 additions and 0 deletions
|
|
@ -173,6 +173,9 @@ void FileSystemModel::updateEntries() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(m_entries.begin(), m_entries.end(), [](const FileSystemEntry* a, const FileSystemEntry* b) {
|
std::sort(m_entries.begin(), m_entries.end(), [](const FileSystemEntry* a, const FileSystemEntry* b) {
|
||||||
|
if (a->isDir() != b->isDir()) {
|
||||||
|
return a->isDir();
|
||||||
|
}
|
||||||
return a->relativePath().localeAwareCompare(b->relativePath()) < 0;
|
return a->relativePath().localeAwareCompare(b->relativePath()) < 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue