MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / setModelData

Method setModelData

src/plugins/binarytools/models/toolitemdelegate.cpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void ToolItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
58{
59 auto edit = qobject_cast<DLineEdit *>(editor);
60 const auto &text = edit->text();
61 if (!text.isEmpty())
62 model->setData(index, text);
63}
64
65void ToolItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
66{

Callers

nothing calls this directly

Calls 3

textMethod · 0.45
isEmptyMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected