1- #include < IAudioService.h>
2-
31#include " FirstLaunchWizard.h"
42#include " ui_FirstLaunchWizard.h"
53
1614#include < QTimer>
1715#include < QUrl>
1816
19- FirstLaunchWizard::FirstLaunchWizard (IAudioService *audioService, QWidget *parent) :
17+ FirstLaunchWizard::FirstLaunchWizard (QWidget *parent) :
2018 QWidget(parent),
21- ui(new Ui::FirstLaunchWizard),
22- audioService(audioService)
19+ ui(new Ui::FirstLaunchWizard)
2320{
2421 ui->setupUi (this );
2522 ui->stackedWidget ->setCurrentIndex (0 );
2623
27- QTimer::singleShot (500 , [& ] {
24+ QTimer::singleShot (500 , this , [= ] {
2825 ui->p1_icon ->startAnimation ();
2926 });
30- ui->p3_icon ->startAnimation ();
31- ui->p4_icon ->startAnimation ();
27+ ui->p3_icon ->startAnimation ();
28+ ui->p3b_icon ->startAnimation ();
29+ ui->p4_icon ->startAnimation ();
3230
3331 ui->stackedWidget ->setAnimation (QEasingCurve::Type::OutCirc);
34- connect (ui->p1_next , &QPushButton::clicked, [&] {
32+ connect (ui->p1_next , &QPushButton::clicked, this , [&] {
3533 ui->stackedWidget ->slideInIdx (1 );
3634 });
37- connect (ui->p3_next , &QPushButton::clicked, [&] {
35+ connect (ui->p3_next , &QPushButton::clicked, this , [&] {
3836 ui->stackedWidget ->slideInIdx (2 );
3937 });
40- connect (ui->p4_next , &QPushButton::clicked, [&] {
38+ connect (ui->p3b_next , &QPushButton::clicked, this , [&] {
39+ ui->stackedWidget ->slideInIdx (3 );
40+ });
41+ connect (ui->p4_next , &QPushButton::clicked, this , [&] {
4142 emit wizardFinished ();
4243 });
43- connect (ui->p4_telegram , &QPushButton::clicked, [& ] {
44+ connect (ui->p4_telegram , &QPushButton::clicked, [] {
4445 QDesktopServices::openUrl (QUrl (" https://t.me/joinchat/FTKC2A2bolHkFAyO-fuPjw" ));
45- });
46+ });
47+
48+ connect (ui->p3b_viewReports , &QPushButton::clicked, [] {
49+ QDesktopServices::openUrl (QUrl (" https://gist.github.com/ThePBone/3c757623c31400e799ab786ad3bf0709" ));
50+ });
51+
52+ ui->p3b_rejectReports ->setChecked (!AppConfig::instance ().get <bool >(AppConfig::SendCrashReports));
53+ ui->p3b_allowReports ->setChecked (AppConfig::instance ().get <bool >(AppConfig::SendCrashReports));
4654
4755 ui->p3_systray_disable ->setChecked (!AppConfig::instance ().get <bool >(AppConfig::TrayIconEnabled));
4856 ui->p3_systray_enable ->setChecked (AppConfig::instance ().get <bool >(AppConfig::TrayIconEnabled));
@@ -54,6 +62,9 @@ FirstLaunchWizard::FirstLaunchWizard(IAudioService *audioService, QWidget *paren
5462 connect (ui->p3_systray_disable , &QRadioButton::clicked, this , &FirstLaunchWizard::onSystrayRadioSelected);
5563 connect (ui->p3_systray_enable , &QRadioButton::clicked, this , &FirstLaunchWizard::onSystrayRadioSelected);
5664 connect (ui->p3_systray_minOnBoot , &QCheckBox::stateChanged, this , &FirstLaunchWizard::onSystrayAutostartToggled);
65+
66+ connect (ui->p3b_rejectReports , &QRadioButton::clicked, this , &FirstLaunchWizard::onCrashReportRadioSelected);
67+ connect (ui->p3b_allowReports , &QRadioButton::clicked, this , &FirstLaunchWizard::onCrashReportRadioSelected);
5768}
5869
5970FirstLaunchWizard::~FirstLaunchWizard ()
@@ -72,11 +83,6 @@ void FirstLaunchWizard::showEvent(QShowEvent *ev)
7283
7384void FirstLaunchWizard::onSystrayRadioSelected ()
7485{
75- if (lockslot)
76- {
77- return ;
78- }
79-
8086 AppConfig::instance ().set (AppConfig::TrayIconEnabled, ui->p3_systray_enable ->isChecked ());
8187 ui->p3_systray_minOnBoot ->setEnabled (ui->p3_systray_enable ->isChecked ());
8288}
@@ -95,3 +101,8 @@ void FirstLaunchWizard::onSystrayAutostartToggled(bool isChecked)
95101 QFile (path).remove ();
96102 }
97103}
104+
105+ void FirstLaunchWizard::onCrashReportRadioSelected ()
106+ {
107+ AppConfig::instance ().set (AppConfig::SendCrashReports, ui->p3b_allowReports ->isChecked ());
108+ }
0 commit comments