MCPcopy Create free account
hub / github.com/KDE/kdevelop / setEditorData

Method setEditorData

kdevplatform/shell/launchconfigurationdialog.cpp:970–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968}
969
970void LaunchConfigurationModelDelegate::setEditorData ( QWidget* editor, const QModelIndex& index ) const
971{
972 const auto* model = static_cast<const LaunchConfigurationsModel*>(index.model());
973 LaunchConfiguration* config = model->configForIndex( index );
974 if( index.column() == 1 && config )
975 {
976 auto* box = qobject_cast<KComboBox*>( editor );
977 box->setCurrentIndex( box->findData( index.data( Qt::EditRole ) ) );
978 }
979 else
980 {
981 QStyledItemDelegate::setEditorData ( editor, index );
982 }
983}
984
985void LaunchConfigurationModelDelegate::setModelData ( QWidget* editor, QAbstractItemModel* model, const QModelIndex& index ) const
986{

Callers

nothing calls this directly

Calls 5

configForIndexMethod · 0.80
setCurrentIndexMethod · 0.80
modelMethod · 0.45
columnMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected