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

Method data

kdevplatform/debugger/util/pathmappings.cpp:94–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
95 {
96 if (!index.isValid()) return QVariant();
97 if (index.parent().isValid()) return QVariant();
98 if (index.column() > 1) return QVariant();
99 if (index.row() > m_paths.count()) return QVariant();
100 if (role == Qt::DisplayRole || role == Qt::EditRole) {
101 if (index.row() == m_paths.count()) return QString();
102 if (index.column() == 0) {
103 return m_paths[index.row()].remote.toDisplayString(QUrl::PreferLocalFile);
104 } else if (index.column() == 1) {
105 return m_paths[index.row()].local.toDisplayString(QUrl::PreferLocalFile);
106 }
107 }
108 return QVariant();
109 }
110
111 Qt::ItemFlags flags(const QModelIndex& index) const override
112 {

Callers

nothing calls this directly

Calls 7

QVariantClass · 0.50
QStringClass · 0.50
isValidMethod · 0.45
parentMethod · 0.45
columnMethod · 0.45
rowMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected