1 #include <QFileInfoList>
5 #include "bookfinder.h"
8 BookFinder::BookFinder(QObject *parent): QObject(parent)
12 void BookFinder::find(const QString &path, const QStringList &books)
15 QStringList booksFound;
19 QStringList filters(QString("*.epub"));
20 QFileInfoList entries =
21 QDir(path).entryInfoList(filters, QDir::Files | QDir::Readable);
22 foreach (QFileInfo entry, entries) {
23 booksFound.append(entry.absoluteFilePath());
26 foreach (QString found, booksFound) {
27 if (!books.contains(found)) {
32 foreach (QString found, booksFound) {
33 if (!books.contains(found)) {
34 qDebug() << "New book" << found;