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