MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / Reload

Method Reload

Source/Tools/FEXConfig/Main.cpp:72–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void ConfigModel::Reload() {
73 const auto& Options = LoadedConfig->GetOptionMap();
74
75 beginResetModel();
76 removeRows(0, rowCount());
77 for (auto& Option : Options) {
78 if (!LoadedConfig->OptionExists(Option.first)) {
79 continue;
80 }
81
82 auto& [Name, TypeId] = ConfigToNameLookup.find(Option.first)->second;
83 auto Item = new QStandardItem(QString::fromStdString(Name));
84
85 const char* OptionType = TypeId.data();
86 Item->setData(OptionType, Qt::UserRole + 1);
87 Item->setData(QString::fromStdString(std::get<fextl::string>(Option.second).c_str()), Qt::UserRole + 2);
88 appendRow(Item);
89 }
90 endResetModel();
91}
92
93bool ConfigModel::has(const QString& Name, bool) const {
94 return LoadedConfig->OptionExists(NameToConfigLookup.at(Name.toStdString()));

Callers 2

ConfigRuntimeMethod · 0.80
onLoadMethod · 0.80

Calls 14

LoadFileFunction · 0.85
CreateJSONFunction · 0.85
json_getPropertyFunction · 0.85
json_getChildFunction · 0.85
json_getSiblingFunction · 0.85
json_getNameFunction · 0.85
json_getIntegerFunction · 0.85
GetDataDirectoryFunction · 0.85
IsSquashFSFunction · 0.85
string_from_pathFunction · 0.85
IsEroFSFunction · 0.85
setDataMethod · 0.80

Tested by

no test coverage detected