Actions
Bug #14925
open
MS
WMenuItem: segfault later if set both checkable and icon
Bug #14925:
WMenuItem: segfault later if set both checkable and icon
Start date:
10/28/2026
Due date:
% Done:
0%
Estimated time:
Description
Affected WMenuItem of Wt 4.14.4 (and former versions)
segfault in WMenuItem::isChecked because the dev did not care about pointers!
At least, it could have been a clear exception easily by using reference cast dynamic_cast<WCheckBox &> in
STR:
run attached main.cpp
it contains:
setCheckable(true);
setIcon("some.ico");
log("trace") << "checkable " << isCheckable();
log("trace") << "checked " << isChecked();
There is an indirect hint in the docs that checkable and icon were mutually exclusive (at setCheckable only):
"When an item is checkable, a checkbox is displayed to the left of the item text (instead of an icon)."
This is not necessary because it works well with the following workaround:
Files
RM Updated by Romain Mardulyn 10 days ago
- Target version set to 4.16.0
Actions