Skip to content

Commit

Permalink
deps: Adjust osltoy for Qt 6.8
Browse files Browse the repository at this point in the history
Qt 6.8 deprecates QCheckBox::stateChanged().

Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz committed Feb 6, 2025
1 parent ffc5b90 commit 669b978
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/osltoy/osltoyapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1298,8 +1298,13 @@ OSLToyMainWindow::make_param_adjustment_row(ParamRec* param,
auto diddleCheckbox = new QCheckBox(" ");
if (m_diddlers[param->name.string()])
diddleCheckbox->setCheckState(Qt::Checked);
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
connect(diddleCheckbox, &QCheckBox::checkStateChanged, this,
[=](Qt::CheckState state) { set_param_diddle(param, int(state)); });
#else
connect(diddleCheckbox, &QCheckBox::stateChanged, this,
[=](int state) { set_param_diddle(param, state); });
#endif
layout->addWidget(diddleCheckbox, row, 0);

std::string typetext(param->type.c_str());
Expand Down

0 comments on commit 669b978

Please sign in to comment.