MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / ResourceFolderModel

Method ResourceFolderModel

launcher/minecraft/mod/ResourceFolderModel.cpp:15–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include "tasks/Task.h"
14
15ResourceFolderModel::ResourceFolderModel(QDir dir, QObject* parent) : QAbstractListModel(parent), m_dir(dir), m_watcher(this)
16{
17 FS::ensureFolderPathExists(m_dir.absolutePath());
18
19 m_dir.setFilter(QDir::Readable | QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
20 m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware);
21
22 connect(&m_watcher, &QFileSystemWatcher::directoryChanged, this, &ResourceFolderModel::directoryChanged);
23}
24
25ResourceFolderModel::~ResourceFolderModel()
26{

Callers

nothing calls this directly

Calls 3

ensureFolderPathExistsFunction · 0.85
setFilterMethod · 0.45
setSortingMethod · 0.45

Tested by

no test coverage detected