Commit 8c9d99571ea2a007a60cd42fec664254f41a9803
1 parent
b5aa01c1
Implementation removal
Showing
1 changed file
with
0 additions
and
32 deletions
openbr/core/qtutils.cpp
| @@ -38,38 +38,6 @@ using namespace br; | @@ -38,38 +38,6 @@ using namespace br; | ||
| 38 | namespace QtUtils | 38 | namespace QtUtils |
| 39 | { | 39 | { |
| 40 | 40 | ||
| 41 | -QStringList getFiles(QDir dir, bool recursive) | ||
| 42 | -{ | ||
| 43 | - dir = QDir(dir.canonicalPath()); | ||
| 44 | - | ||
| 45 | - QStringList files; | ||
| 46 | - foreach (const QString &file, naturalSort(dir.entryList(QDir::Files))) | ||
| 47 | - files.append(dir.absoluteFilePath(file)); | ||
| 48 | - | ||
| 49 | - if (!recursive) return files; | ||
| 50 | - | ||
| 51 | - foreach (const QString &folder, naturalSort(dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))) { | ||
| 52 | - QDir subdir(dir); | ||
| 53 | - bool success = subdir.cd(folder); if (!success) qFatal("cd failure."); | ||
| 54 | - files.append(getFiles(subdir, true)); | ||
| 55 | - } | ||
| 56 | - return files; | ||
| 57 | -} | ||
| 58 | - | ||
| 59 | -QStringList getFiles(const QString ®exp) | ||
| 60 | -{ | ||
| 61 | - QFileInfo fileInfo(regexp); | ||
| 62 | - QDir dir(fileInfo.dir()); | ||
| 63 | - QRegExp re(fileInfo.fileName()); | ||
| 64 | - re.setPatternSyntax(QRegExp::Wildcard); | ||
| 65 | - | ||
| 66 | - QStringList files; | ||
| 67 | - foreach (const QString &fileName, dir.entryList(QDir::Files)) | ||
| 68 | - if (re.exactMatch(fileName)) | ||
| 69 | - files.append(dir.filePath(fileName)); | ||
| 70 | - return files; | ||
| 71 | -} | ||
| 72 | - | ||
| 73 | QStringList readLines(const QString &file) | 41 | QStringList readLines(const QString &file) |
| 74 | { | 42 | { |
| 75 | QStringList lines; | 43 | QStringList lines; |