| 46 | #include <QDebug> |
| 47 | |
| 48 | WorldList::WorldList(const QString &dir) |
| 49 | : QAbstractListModel(), m_dir(dir) |
| 50 | { |
| 51 | FS::ensureFolderPathExists(m_dir.absolutePath()); |
| 52 | m_dir.setFilter(QDir::Readable | QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); |
| 53 | m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware); |
| 54 | m_watcher = new QFileSystemWatcher(this); |
| 55 | is_watching = false; |
| 56 | connect(m_watcher, SIGNAL(directoryChanged(QString)), this, |
| 57 | SLOT(directoryChanged(QString))); |
| 58 | } |
| 59 | |
| 60 | void WorldList::startWatching() |
| 61 | { |
nothing calls this directly
no test coverage detected