- QStringList result = dir.entryList(QDir::Files);
- int precision = 1;
- QString pathValue;
- QMap <int, QString> sortedList;
- foreach(const QString &path, result) {
- if (rx.exactMatch(path)) {
- pathValue = path.section('.', 0, -2);
- pathValue.remove(0, filter.size());
- sortedList.insert(pathValue.toInt(), path);
+ QString path;
+ int gap = 0;
+ for (int i = 0; gap < 100; i++) {
+ path = filter + QString::number(i).rightJustified(precision, '0', false) + ext;
+ if (dir.exists(path)) {
+ (*list).append(folder + path);
+ gap = 0;
+ } else {
+ gap++;