mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Display info about crash dump
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
#include "blackmisc/statusmessage.h"
|
#include "blackmisc/statusmessage.h"
|
||||||
#include "blackconfig/buildconfig.h"
|
#include "blackconfig/buildconfig.h"
|
||||||
|
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
using namespace BlackMisc::Network;
|
using namespace BlackMisc::Network;
|
||||||
using namespace BlackMisc::Settings;
|
using namespace BlackMisc::Settings;
|
||||||
@@ -39,6 +41,13 @@ namespace BlackGui
|
|||||||
ui->cb_CrashDumps->setChecked(settings.isEnabled());
|
ui->cb_CrashDumps->setChecked(settings.isEnabled());
|
||||||
ui->cb_Agree->setChecked(CBuildConfig::isLocalDeveloperDebugBuild());
|
ui->cb_Agree->setChecked(CBuildConfig::isLocalDeveloperDebugBuild());
|
||||||
connect(ui->cb_CrashDumps, &QCheckBox::toggled, this, &CLegalInfoComponent::onAllowCrashDumps);
|
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()
|
CLegalInfoComponent::~CLegalInfoComponent()
|
||||||
@@ -64,6 +73,13 @@ namespace BlackGui
|
|||||||
m_crashDumpSettings.setAndSave(settings);
|
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()
|
void CLegalInfoComponent::setChecklistInfo()
|
||||||
{
|
{
|
||||||
if (!sGui) { return; }
|
if (!sGui) { return; }
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ namespace BlackGui
|
|||||||
//! Allow crash dumps
|
//! Allow crash dumps
|
||||||
void onAllowCrashDumps(bool checked);
|
void onAllowCrashDumps(bool checked);
|
||||||
|
|
||||||
|
//! Crashdum hint
|
||||||
|
void showCrashDumpHint();
|
||||||
|
|
||||||
//! Set the checklist info
|
//! Set the checklist info
|
||||||
void setChecklistInfo();
|
void setChecklistInfo();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user