[Windows registry] Allow to clean all swift registry entries

* for uninstallation
* few users reported a hanging (white screen) swift issue, solved by "cleaning the registry"

see https://discordapp.com/channels/539048679160676382/539925070550794240/664557031784448010
This commit is contained in:
Klaus Basan
2020-01-09 20:25:59 +01:00
parent e5449347e0
commit 8c5fe89f6c
6 changed files with 103 additions and 26 deletions

View File

@@ -96,6 +96,13 @@ CSwiftLauncher::CSwiftLauncher(QWidget *parent) :
m_checkTimer.setInterval(2500);
m_checkTimer.start();
// platform specific tool
ui->gb_ToolsWindows->setEnabled(CBuildConfig::isRunningOnWindowsNtPlatform());
if (CBuildConfig::isRunningOnWindowsNtPlatform())
{
connect(ui->pb_ClearRegistry, &QPushButton::released, this, &CSwiftLauncher::clearWindowsRegistry);
}
const QPointer<CSwiftLauncher> myself(this);
if (sGui->isInstallerOptionSet())
{
@@ -163,6 +170,18 @@ void CSwiftLauncher::installerMode()
if (startWizard) { this->startWizard(); }
}
void CSwiftLauncher::clearWindowsRegistry()
{
if (!CBuildConfig::isRunningOnWindowsNtPlatform()) { return; }
const QMessageBox::StandardButton ret = QMessageBox::warning(this,
tr("Registry swift applications"),
tr("Do you really want to delete all entries?\nThis cannot be undone!"),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
QMessageBox::No);
if (ret != QMessageBox::Yes) { return; }
CGuiApplication::removeAllWindowsSwiftRegistryEntries();
}
CSwiftLauncher::~CSwiftLauncher()
{ }