mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Display info about crash dump
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Settings;
|
||||
@@ -39,6 +41,13 @@ namespace BlackGui
|
||||
ui->cb_CrashDumps->setChecked(settings.isEnabled());
|
||||
ui->cb_Agree->setChecked(CBuildConfig::isLocalDeveloperDebugBuild());
|
||||
connect(ui->cb_CrashDumps, &QCheckBox::toggled, this, &CLegalInfoComponent::onAllowCrashDumps);
|
||||
|
||||
QPointer<CLegalInfoComponent> myself(this);
|
||||
QTimer::singleShot(5000, this, [ = ]
|
||||
{
|
||||
if (!sApp || sApp->isShuttingDown() || !myself) { return; }
|
||||
myself->showCrashDumpHint();
|
||||
});
|
||||
}
|
||||
|
||||
CLegalInfoComponent::~CLegalInfoComponent()
|
||||
@@ -64,6 +73,13 @@ namespace BlackGui
|
||||
m_crashDumpSettings.setAndSave(settings);
|
||||
}
|
||||
|
||||
void CLegalInfoComponent::showCrashDumpHint()
|
||||
{
|
||||
if (ui->cb_CrashDumps->isChecked()) { return; }
|
||||
const CStatusMessage m = CStatusMessage(this).info("We recommend to enable crash dump uploads");
|
||||
this->showOverlayHTMLMessage(m, 7500);
|
||||
}
|
||||
|
||||
void CLegalInfoComponent::setChecklistInfo()
|
||||
{
|
||||
if (!sGui) { return; }
|
||||
|
||||
@@ -47,6 +47,9 @@ namespace BlackGui
|
||||
//! Allow crash dumps
|
||||
void onAllowCrashDumps(bool checked);
|
||||
|
||||
//! Crashdum hint
|
||||
void showCrashDumpHint();
|
||||
|
||||
//! Set the checklist info
|
||||
void setChecklistInfo();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user