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

Method data

app/plasma/applet/plugin/sessionlistmodel.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40QVariant SessionListModel::data(const QModelIndex &index, int role) const
41{
42 if (!index.isValid() || index.row() >= m_sessionDataList.size()) {
43 return QVariant();
44 }
45
46 const KDevelopSessionData sessionData = m_sessionDataList.at(index.row());
47
48 switch (role) {
49 case Qt::DisplayRole: {
50 return sessionData.description;
51 case SessionIdRole:
52 return sessionData.id;
53 }
54 }
55
56 return QVariant();
57}
58
59void SessionListModel::setSessionDataList(const QVector<KDevelopSessionData>& sessionDataList)
60{

Callers 4

receiveConnectionMethod · 0.45
QtSingleApplicationMethod · 0.45
~QtSingleApplicationMethod · 0.45
runMethod · 0.45

Calls 5

QVariantClass · 0.50
isValidMethod · 0.45
rowMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected