| 41 | extern Global global; |
| 42 | |
| 43 | FileWatcher::FileWatcher(QString dir, ScanType type, qint32 notebookLid, bool subdirs, QObject *parent) : |
| 44 | QFileSystemWatcher(parent) |
| 45 | { |
| 46 | this->notebookLid = notebookLid; |
| 47 | this->dir = dir; |
| 48 | this->scanType = type; |
| 49 | this->includeSubdirectories = subdirs; |
| 50 | addDirectory(dir); |
| 51 | |
| 52 | connect(this, SIGNAL(directoryChanged(QString)), this, SLOT(saveDirectory(QString))); |
| 53 | connect(this, SIGNAL(fileChanged(QString)), this, SLOT(saveFile(QString))); |
| 54 | } |
| 55 | |
| 56 | |
| 57 | void FileWatcher::saveDirectory(QString dir){ |
nothing calls this directly
no outgoing calls
no test coverage detected