set: fix wrong save path / fixed null deref / more env refactor
This commit is contained in:
parent
047808c89f
commit
c87c8d0990
5 changed files with 117 additions and 119 deletions
|
|
@ -947,9 +947,12 @@ HeaderWidget::HeaderWidget(QWidget *parent) : QWidget(parent) {
|
|||
channels->setChecked(true);
|
||||
}
|
||||
connect(channels, &QCheckBox::stateChanged, [this, parent](){
|
||||
set->setValue("show_channels", channels->isChecked(), sizeof("show_channels"));
|
||||
if(!OverseerHandler::settingsPath.empty()){
|
||||
set->save(OverseerHandler::settingsPath.c_str());
|
||||
//TODO: Find a better way to auto no-op when there's no settings file
|
||||
if(set) {
|
||||
set->setValue("show_channels", channels->isChecked(), sizeof("show_channels"));
|
||||
if(!OverseerHandler::settingsPath.empty()){
|
||||
set->save(OverseerHandler::settingsPath.c_str());
|
||||
}
|
||||
}
|
||||
if(parent) {
|
||||
QEvent explosion = QEvent((QEvent::Type)CustomQEvent::RecomposeMainWindow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue