feat: Add crash recovery on Windows (#5012)

This commit is contained in:
nerix
2023-12-24 15:38:58 +01:00
committed by GitHub
parent 2cb965d352
commit 25add89b14
29 changed files with 563 additions and 258 deletions
@@ -125,6 +125,28 @@ QCheckBox *GeneralPageView::addCheckbox(const QString &text,
return check;
}
QCheckBox *GeneralPageView::addCustomCheckbox(const QString &text,
const std::function<bool()> &load,
std::function<void(bool)> save,
const QString &toolTipText)
{
auto *check = new QCheckBox(text);
this->addToolTip(*check, toolTipText);
check->setChecked(load());
QObject::connect(check, &QCheckBox::toggled, this,
[save = std::move(save)](bool state) {
save(state);
});
this->addWidget(check);
this->groups_.back().widgets.push_back({check, {text}});
return check;
}
ComboBox *GeneralPageView::addDropdown(const QString &text,
const QStringList &list,
QString toolTipText)