| 914 | } |
| 915 | |
| 916 | void 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 | |
| 934 | bool registryValueExists(const QString& keyName, const QString& valueName) |
| 935 | { |
no test coverage detected