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

Method updateRegistryKey

src/settings.cpp:2416–2431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2414}
2415
2416void GlobalSettings::updateRegistryKey()
2417{
2418 const QString OldOrganization = "Tannin";
2419 const QString OldApplication = "Mod Organizer";
2420 const QString OldInstanceValue = "CurrentInstance";
2421
2422 const QString OldRootKey = "Software\\" + OldOrganization;
2423
2424 if (env::registryValueExists(OldRootKey + "\\" + OldApplication, OldInstanceValue)) {
2425 QSettings old(OldOrganization, OldApplication);
2426 setCurrentInstance(old.value(OldInstanceValue).toString());
2427 old.remove(OldInstanceValue);
2428 }
2429
2430 env::deleteRegistryKeyIfEmpty(OldRootKey);
2431}
2432
2433QString GlobalSettings::currentInstance()
2434{

Callers

nothing calls this directly

Calls 5

registryValueExistsFunction · 0.85
deleteRegistryKeyIfEmptyFunction · 0.85
toStringMethod · 0.45
valueMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected