Fix setting and removing registy values for Browser Integration

This commit is contained in:
varjolintu 2019-10-05 16:31:48 +03:00 committed by Jonathan White
parent 7d0f89ef46
commit e5295b4eb0

View File

@ -109,9 +109,7 @@ void HostInstaller::installBrowser(SupportedBrowsers browser,
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// Create a registry key // Create a registry key
QSettings settings(getTargetPath(browser), QSettings::NativeFormat); QSettings settings(getTargetPath(browser), QSettings::NativeFormat);
if (!registryEntryFound(settings)) { settings.setValue("Default", getPath(browser));
settings.setValue("Default", getPath(browser));
}
#endif #endif
// Always create the script file // Always create the script file
QJsonObject script = constructFile(browser, proxy, location); QJsonObject script = constructFile(browser, proxy, location);
@ -128,9 +126,7 @@ void HostInstaller::installBrowser(SupportedBrowsers browser,
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// Remove the registry entry // Remove the registry entry
QSettings settings(getTargetPath(browser), QSettings::NativeFormat); QSettings settings(getTargetPath(browser), QSettings::NativeFormat);
if (registryEntryFound(settings)) { settings.remove("Default");
settings.remove("Default");
}
#endif #endif
} }
} }