aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <[email protected]>2015-08-02 12:39:05 +0200
committerChristoph Cullmann <[email protected]>2015-08-02 12:39:05 +0200
commit54d17c0dfab6b38ac214a5f91efabd1d23176963 (patch)
tree5f74314ade02da92f33704db363e280bfb25d9f1
parent777cdae21c98437b936974b0c7e73a33b0c8e999 (diff)
sort the file list, otherwise we have more or less a random order (yeah, its the order in the dir entries, but thats random for the user :=)
-rw-r--r--addons/search/FolderFilesList.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/search/FolderFilesList.cpp b/addons/search/FolderFilesList.cpp
index f77699f..63286e7 100644
--- a/addons/search/FolderFilesList.cpp
+++ b/addons/search/FolderFilesList.cpp
@@ -1,5 +1,5 @@
/* Kate search plugin
- *
+ *
* Copyright (C) 2013 by Kåre Särs <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
@@ -110,7 +110,8 @@ void FolderFilesList::checkNextItem(const QFileInfo &item)
if (m_recursive) filter |= QDir::AllDirs;
if (!m_symlinks) filter |= QDir::NoSymLinks;
- QFileInfoList currentItems = currentDir.entryInfoList(m_types, filter);
+ // sort the items to have an deterministic order!
+ const QFileInfoList currentItems = currentDir.entryInfoList(m_types, filter, QDir::LocaleAware);
bool skip;
for (int i = 0; i<currentItems.size(); ++i) {