mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +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()
|
||||
{ }
|
||||
|
||||
|
||||
@@ -216,6 +216,9 @@ private:
|
||||
//! Run in installer mode
|
||||
void installerMode();
|
||||
|
||||
//! Clear Windows registry
|
||||
void clearWindowsRegistry();
|
||||
|
||||
//! Command line
|
||||
static QString toCmdLine(const QString &exe, const QStringList &exeArgs);
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<item>
|
||||
<widget class="QToolBox" name="tb_Launcher">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="tabSpacing">
|
||||
<number>6</number>
|
||||
@@ -214,6 +214,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pg_CoreMode">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>450</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>&Core mode</string>
|
||||
</attribute>
|
||||
@@ -528,7 +536,7 @@
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<spacer name="vs_Tools">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -541,8 +549,31 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QGroupBox" name="gb_ToolsP3dFsx">
|
||||
<property name="title">
|
||||
<string>P3D/FSX</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_P3DConfigDirs">
|
||||
<property name="text">
|
||||
<string>P3D config dirs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_FSXConfigDirs">
|
||||
<property name="text">
|
||||
<string>FSX config dirs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="gb_Log">
|
||||
<widget class="QGroupBox" name="gb_ToolsLog">
|
||||
<property name="title">
|
||||
<string>Log</string>
|
||||
</property>
|
||||
@@ -571,23 +602,16 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QGroupBox" name="gb_P3dFsx">
|
||||
<item row="4" column="0">
|
||||
<widget class="QGroupBox" name="gb_ToolsWindows">
|
||||
<property name="title">
|
||||
<string>P3D/FSX</string>
|
||||
<string>Windows</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="vl_ClearRegistry">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_P3DConfigDirs">
|
||||
<widget class="QPushButton" name="pb_ClearRegistry">
|
||||
<property name="text">
|
||||
<string>P3D config dirs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_FSXConfigDirs">
|
||||
<property name="text">
|
||||
<string>FSX config dirs.</string>
|
||||
<string>clear registry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -840,6 +864,12 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlackGui::COverlayMessagesFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/overlaymessagesframe.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbLoadOverviewComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
@@ -852,12 +882,6 @@
|
||||
<header>blackgui/components/logcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::COverlayMessagesFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/overlaymessagesframe.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CInfoBarWebReadersStatusSmallComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
|
||||
Reference in New Issue
Block a user