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

Method data

plugins/welcomepage/sessionlistmodel.cpp:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41QVariant SessionListModel::data(const QModelIndex& index, int role) const
42{
43 if (index.row() < 0 || index.row() >= m_sessions.size()) {
44 return QVariant();
45 }
46
47 const auto& sessionInfo = m_sessions[index.row()];
48
49 switch (role) {
50 case Qt::DisplayRole:
51 return sessionInfo.description;
52 case SessionIdRole:
53 return sessionInfo.uuid.toString();
54 }
55
56 return QVariant();
57}
58
59void SessionListModel::onSessionDeleted(const QString& id)
60{

Callers 1

onSessionClickedMethod · 0.45

Calls 4

QVariantClass · 0.50
rowMethod · 0.45
sizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected