| 30 | #include <QtWidgets> |
| 31 | |
| 32 | class ScanFilesThread : public QNapiThread { |
| 33 | Q_OBJECT |
| 34 | public: |
| 35 | ScanFilesThread(); |
| 36 | void run(); |
| 37 | void setSearchPath(const QString &path) { searchPath = path; } |
| 38 | void setFilters(const QString &filters) { scanFilters = filters.split(" "); } |
| 39 | void setSkipFilters(const QString &filters) { |
| 40 | skipFilters = filters.split(" "); |
| 41 | } |
| 42 | void setSkipIfSubtitlesExists(bool skip) { skipIfSubtitlesExists = skip; } |
| 43 | void setFollowSymLinks(bool follow) { followSymLinks = follow; } |
| 44 | |
| 45 | QStringList fileList; |
| 46 | |
| 47 | signals: |
| 48 | void addFile(const QString &fileName); |
| 49 | void scanFinished(bool result); |
| 50 | void folderChange(const QString &folder); |
| 51 | |
| 52 | private: |
| 53 | bool doScan(const QString &path, QDir::Filters filters); |
| 54 | |
| 55 | QSharedPointer<const StaticConfig> staticConfig; |
| 56 | QString searchPath; |
| 57 | QStringList scanFilters, skipFilters; |
| 58 | bool skipIfSubtitlesExists, followSymLinks; |
| 59 | QSet<QString> visited; |
| 60 | }; |
| 61 | |
| 62 | class frmScan : public QDialog { |
| 63 | Q_OBJECT |
nothing calls this directly
no outgoing calls
no test coverage detected