| 26 | #include "minecraft/skins/SkinModel.h" |
| 27 | |
| 28 | SkinList::SkinList(QObject* parent, QString path, MinecraftAccountPtr acct) : QAbstractListModel(parent), m_acct(acct) |
| 29 | { |
| 30 | FS::ensureFolderPathExists(m_dir.absolutePath()); |
| 31 | m_dir.setFilter(QDir::Readable | QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); |
| 32 | m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware); |
| 33 | m_watcher.reset(new QFileSystemWatcher(this)); |
| 34 | is_watching = false; |
| 35 | connect(m_watcher.get(), &QFileSystemWatcher::directoryChanged, this, &SkinList::directoryChanged); |
| 36 | connect(m_watcher.get(), &QFileSystemWatcher::fileChanged, this, &SkinList::fileChanged); |
| 37 | directoryChanged(path); |
| 38 | } |
| 39 | |
| 40 | void SkinList::startWatching() |
| 41 | { |
nothing calls this directly
no test coverage detected