qt: return nullptr for unhandled editors in AssignableEditorDelegate

This commit is contained in:
Jussi Kuokkanen 2019-11-26 13:02:31 +02:00
parent ff20e91cb7
commit 4d14cd9852

View File

@ -23,13 +23,13 @@ QWidget *AssignableEditorDelegate::createEditor(QWidget *parent, const QStyleOpt
editor = new IntRangeEditor(parent); editor = new IntRangeEditor(parent);
return editor; return editor;
default: default:
return QStyledItemDelegate::createEditor(parent, option, index); return nullptr;
} }
case TC_ASSIGNABLE_ENUM: case TC_ASSIGNABLE_ENUM:
editor = new EnumEditor(parent); editor = new EnumEditor(parent);
return editor; return editor;
default: default:
return QStyledItemDelegate::createEditor(parent, option, index); return nullptr;
} }
} }