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

Function deleteRegistryKeyIfEmpty

src/env.cpp:916–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

914}
915
916void deleteRegistryKeyIfEmpty(const QString& name)
917{
918 if (name.isEmpty()) {
919 return;
920 }
921
922 auto key = openRegistryKey(HKEY_CURRENT_USER, name.toStdWString().c_str());
923 if (!key) {
924 return;
925 }
926
927 if (!isKeyEmpty(key.get())) {
928 return;
929 }
930
931 ::RegDeleteTreeW(HKEY_CURRENT_USER, name.toStdWString().c_str());
932}
933
934bool registryValueExists(const QString& keyName, const QString& valueName)
935{

Callers 1

updateRegistryKeyMethod · 0.85

Calls 4

openRegistryKeyFunction · 0.85
isKeyEmptyFunction · 0.85
isEmptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected