MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / getProfile

Method getProfile

src/instancemanager.cpp:313–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313void Instance::getProfile(const Settings& s)
314{
315 if (!m_profile.isEmpty()) {
316 // there's already a profile set up, probably an override
317 return;
318 }
319
320 if (auto name = s.game().selectedProfileName()) {
321 // use last profile
322 m_profile = *name;
323 return;
324 }
325
326 // profile missing from ini, use the default
327 m_profile = QString::fromStdWString(AppConfig::defaultProfileName());
328
329 log::warn("no profile found in ini {}, using default '{}'", iniPath(), m_profile);
330}
331
332// returns a list of files and folders that must be deleted when deleting
333// this instance

Callers

nothing calls this directly

Calls 3

selectedProfileNameMethod · 0.80
gameMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected