| 405 | |
| 406 | |
| 407 | QStringList gettestdatafiles(QString testdir) |
| 408 | { |
| 409 | QStringList baseFilePaths; |
| 410 | QTextStream out(stdout); |
| 411 | QStringList nameFilter; |
| 412 | nameFilter << "*_base.*"; |
| 413 | |
| 414 | QDir testdatadir(testdir); |
| 415 | |
| 416 | QStringList baseFileNames = testdatadir.entryList(nameFilter, QDir::Files, QDir::Name); |
| 417 | QListIterator<QString> file_it(baseFileNames); |
| 418 | while(file_it.hasNext()) |
| 419 | { |
| 420 | baseFilePaths.append(testdir + "/" + file_it.next()); |
| 421 | } |
| 422 | out << testdir << ": " << baseFilePaths.size() << " files" << endl; |
| 423 | |
| 424 | |
| 425 | QStringList subdirs = testdatadir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); |
| 426 | QListIterator<QString> dir_it(subdirs); |
| 427 | |
| 428 | while (dir_it.hasNext()) |
| 429 | { |
| 430 | QString subdir = dir_it.next(); |
| 431 | QStringList subdirBaseFilePaths = gettestdatafiles(testdir + "/" + subdir); |
| 432 | |
| 433 | baseFilePaths.append(subdirBaseFilePaths); |
| 434 | } |
| 435 | |
| 436 | return baseFilePaths; |
| 437 | } |
| 438 | |
| 439 | |
| 440 | int main(int argc, char *argv[]) |