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

Method data

src/plugins/project/mainframe/projectmodel.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17QVariant ProjectModel::data(const QModelIndex &index, int role) const
18{
19 if (role == Qt::DecorationRole) {
20 auto name = index.data(Project::IconNameRole).toString();
21 if (!name.isEmpty())
22 return QIcon::fromTheme(name);
23
24 name = index.data(Project::FileIconRole).toString();
25 if (!name.isEmpty())
26 return CustomIcons::icon(QFileInfo(name));
27 }
28
29 return QStandardItemModel::data(index, role);
30}

Callers 15

addRecentOpenWidgetMethod · 0.45
appendRootItemMethod · 0.45
doItemMenuRequestMethod · 0.45
restoreExpandStateMethod · 0.45
childMenuMethod · 0.45
performDragMethod · 0.45
doDoubleClickedMethod · 0.45
renameDocumentMethod · 0.45
actionDeleteDocumentMethod · 0.45
actionOpenInTerminalMethod · 0.45
createNewDirectoryMethod · 0.45
creatNewDocumentMethod · 0.45

Calls 3

iconFunction · 0.85
toStringMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected