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

Method data

src/plugins/codeeditor/gui/completion/codecompletionmodel.cpp:171–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171QVariant CodeCompletionModel::data(const QModelIndex &index, int role) const
172{
173 if (!index.isValid() || index.row() >= d->completionDatas.size())
174 return QVariant();
175
176 const auto &item = d->completionDatas.at(index.row());
177 switch (role) {
178 case NameRole:
179 return item.label;
180 case IconRole:
181 return d->iconForKind(item.kind);
182 case InsertTextRole:
183 return item.insertText;
184 case KindRole:
185 return item.kind;
186 case SortTextRole:
187 return item.sortText;
188 case FilterTextRole:
189 return item.filterText;
190 default:
191 break;
192 }
193
194 return QVariant();
195}
196
197void CodeCompletionModel::onCompleteFinished(const lsp::CompletionProvider &provider)
198{

Callers 15

handleItemClickedMethod · 0.45
selectSymbolMethod · 0.45
itemTextFunction · 0.45
drawTextMethod · 0.45
CodeLensTreeMethod · 0.45
handleShowOpenedFilesMethod · 0.45
searchInTargetMethod · 0.45
replaceTargetMethod · 0.45
filterAcceptsRowMethod · 0.45
lessThanMethod · 0.45
paintItemTextMethod · 0.45

Calls 5

rowMethod · 0.80
atMethod · 0.80
iconForKindMethod · 0.80
isValidMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected