Ref T213, Ref T271 opt-in for crash dumps

This commit is contained in:
Klaus Basan
2018-05-29 00:41:39 +02:00
parent c7f77c6892
commit efba4d99d3
3 changed files with 46 additions and 7 deletions

View File

@@ -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();

View File

@@ -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 };
};
/**

View File

@@ -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>