* construct a menu entry */
| 203 | * construct a menu entry |
| 204 | */ |
| 205 | void ConfigItem::init(void) |
| 206 | { |
| 207 | if (menu) { |
| 208 | ConfigList* list = listView(); |
| 209 | nextItem = (ConfigItem*)menu->data; |
| 210 | menu->data = this; |
| 211 | |
| 212 | if (list->mode != fullMode) |
| 213 | setExpanded(true); |
| 214 | sym_calc_value(menu->sym); |
| 215 | |
| 216 | if (menu->sym) { |
| 217 | enum symbol_type type = menu->sym->type; |
| 218 | |
| 219 | // Allow to edit "int", "hex", and "string" in-place in |
| 220 | // the data column. Unfortunately, you cannot specify |
| 221 | // the flags per column. Set ItemIsEditable for all |
| 222 | // columns here, and check the column in createEditor(). |
| 223 | if (type == S_INT || type == S_HEX || type == S_STRING) |
| 224 | setFlags(flags() | Qt::ItemIsEditable); |
| 225 | } |
| 226 | } |
| 227 | updateMenu(); |
| 228 | } |
| 229 | |
| 230 | /* |
| 231 | * destruct a menu entry |
nothing calls this directly
no test coverage detected