| 2414 | } |
| 2415 | |
| 2416 | void 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 | |
| 2433 | QString GlobalSettings::currentInstance() |
| 2434 | { |
nothing calls this directly
no test coverage detected