MCPcopy Create free account
hub / github.com/YACReader/yacreader / data

Method data

YACReaderLibrary/comic_vine/model/local_comic_list_model.cpp:34–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34QVariant LocalComicListModel::data(const QModelIndex &index, int role) const
35{
36 if (!index.isValid())
37 return QVariant();
38
39 if (role == Qt::DecorationRole) {
40 return QVariant();
41 }
42 if (role == Qt::TextAlignmentRole) {
43 // TODO
44 }
45
46 if (role != Qt::DisplayRole)
47 return QVariant();
48
49 int row = index.row();
50
51 // if(row < _data.count())
52 return _data[row].getFileName();
53 // else
54 // return QVariant();
55}
56
57Qt::ItemFlags LocalComicListModel::flags(const QModelIndex &index) const
58{

Callers

nothing calls this directly

Calls 3

getFileNameMethod · 0.80
isValidMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected