mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
[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:
@@ -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()
|
||||
{ }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user