| 23 | #include <QDebug> |
| 24 | |
| 25 | WorldList::WorldList(const QString &dir) |
| 26 | : QAbstractListModel(), m_dir(dir) |
| 27 | { |
| 28 | FS::ensureFolderPathExists(m_dir.absolutePath()); |
| 29 | m_dir.setFilter(QDir::Readable | QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); |
| 30 | m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware); |
| 31 | m_watcher = new QFileSystemWatcher(this); |
| 32 | is_watching = false; |
| 33 | connect(m_watcher, SIGNAL(directoryChanged(QString)), this, |
| 34 | SLOT(directoryChanged(QString))); |
| 35 | } |
| 36 | |
| 37 | void WorldList::startWatching() |
| 38 | { |
nothing calls this directly
no test coverage detected