MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / SkinList

Method SkinList

launcher/minecraft/skins/SkinList.cpp:28–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#include "minecraft/skins/SkinModel.h"
27
28SkinList::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
40void SkinList::startWatching()
41{

Callers

nothing calls this directly

Calls 5

ensureFolderPathExistsFunction · 0.85
setFilterMethod · 0.45
setSortingMethod · 0.45
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected