gcc7 is complaining about
mscore/osc.cpp:344:66: warning: ?: using integer constants in boolean context [-Wint-in-bool-context]
mixer->partEdit(i)->mute->setChecked(val==0.0f ? Qt::Unchecked : Qt::Checked);
and I think it is right in that Qt::Unchecked and Qt::Checked return and int, not a bool
Comments
It is an enum and can be 0 (Qt::Unchecked ) 1 (Qt::PartiallyChecked) and 2 (Qt::Checked), see http://doc.qt.io/qt-5/qt.html#CheckState-enum
It is used in a similar way as in osc.cpp in several other places throughout the code, only there it uses `setCheckState()`, so I think we should change that here too.
Except that a QToolButton doesn't have this :-(
So I guess we should make this
`mixer->partEdit(i)->mute->setChecked(val==0.0f ? false : true);`
https://github.com/musescore/MuseScore/pull/3202
mute should follow the value of channel->mute (set just above), should minimize future errors if the logic for channel->mute changes
Or even `mixer->partEdit(i)->mute->setChecked(channel->mute);` ;-)
Fixed in branch master, commit afbd15216d
fix #219536 mute checkbox is two state and should be set as bool
Fixed in branch master, commit 8a9abcecfd
Merge pull request #3202 from jeetee/219536_mute_checkbox
fix #219536 mute checkbox is two state and should be set as bool
Fixed in branch 2.2, commit 94936c69d6
fix #219536 mute checkbox is two state and should be set as bool
Automatically closed -- issue fixed for 2 weeks with no activity.