mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T213, Ref T271 opt-in for crash dumps
This commit is contained in:
@@ -22,6 +22,9 @@ namespace BlackGui
|
||||
ui(new Ui::CLegalInfoComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
const bool cd = m_crashDumpUploadEnabled.get();
|
||||
ui->cb_CrashDumps->setChecked(cd);
|
||||
connect(ui->cb_CrashDumps, &QCheckBox::toggled, this, &CLegalInfoComponent::onAllowCrashDumps);
|
||||
}
|
||||
|
||||
CLegalInfoComponent::~CLegalInfoComponent()
|
||||
@@ -40,6 +43,11 @@ namespace BlackGui
|
||||
return false;
|
||||
}
|
||||
|
||||
void CLegalInfoComponent::onAllowCrashDumps(bool checked)
|
||||
{
|
||||
m_crashDumpUploadEnabled.setAndSave(checked);
|
||||
}
|
||||
|
||||
bool CLegalInfoWizardPage::validatePage()
|
||||
{
|
||||
return m_legalInfo && m_legalInfo->validateAgreement();
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#define BLACKGUI_COMPONENTS_LEGALINFOCOMPONENT_H
|
||||
|
||||
#include "blackgui/overlaymessagesframe.h"
|
||||
#include "blackcore/application/applicationsettings.h"
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
#include <QWizardPage>
|
||||
@@ -43,7 +44,11 @@ namespace BlackGui
|
||||
bool validateAgreement();
|
||||
|
||||
private:
|
||||
//! Allow crash dumps
|
||||
void onAllowCrashDumps(bool checked);
|
||||
|
||||
QScopedPointer<Ui::CLegalInfoComponent> ui;
|
||||
BlackMisc::CSetting<BlackCore::Application::TCrashDumpUploadEnabled> m_crashDumpUploadEnabled { this };
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,22 +6,48 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
<width>542</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
<string>swift legal information</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CAboutHtmlComponent" name="comp_AboutHTML"/>
|
||||
<widget class="BlackGui::Components::CAboutHtmlComponent" name="comp_AboutHTML">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_Agree">
|
||||
<property name="text">
|
||||
<string>I agree with the swift license and privacy policy</string>
|
||||
<widget class="QFrame" name="fr_Agree">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_Agree">
|
||||
<property name="text">
|
||||
<string>I agree with the swift license and privacy policy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_CrashDumps">
|
||||
<property name="text">
|
||||
<string>Allow sending crash dumps, by sending we can see what went wrong</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user