| 244 | } |
| 245 | |
| 246 | QWidget *ConfigItemDelegate::createEditor(QWidget *parent, |
| 247 | const QStyleOptionViewItem &option, |
| 248 | const QModelIndex &index) const |
| 249 | { |
| 250 | ConfigItem *item; |
| 251 | |
| 252 | // Only the data column is editable |
| 253 | if (index.column() != dataColIdx) |
| 254 | return nullptr; |
| 255 | |
| 256 | // You cannot edit invisible menus |
| 257 | item = static_cast<ConfigItem *>(index.internalPointer()); |
| 258 | if (!item || !item->menu || !menu_is_visible(item->menu)) |
| 259 | return nullptr; |
| 260 | |
| 261 | return QStyledItemDelegate::createEditor(parent, option, index); |
| 262 | } |
| 263 | |
| 264 | void ConfigItemDelegate::setModelData(QWidget *editor, |
| 265 | QAbstractItemModel *model, |
nothing calls this directly
no test coverage detected