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

Method currentIndex

YACReaderLibrary/yacreader_comics_selection_helper.cpp:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59QModelIndex YACReaderComicsSelectionHelper::currentIndex()
60{
61 if (!_selectionModel)
62 return QModelIndex();
63
64 QModelIndexList indexes = _selectionModel->selectedRows();
65 if (indexes.length() > 0)
66 return indexes[0];
67
68 this->selectIndex(0);
69 indexes = _selectionModel->selectedRows();
70 if (indexes.length() > 0)
71 return indexes[0];
72 else
73 return QModelIndex();
74}
75
76void YACReaderComicsSelectionHelper::selectAll()
77{

Callers

nothing calls this directly

Calls 3

selectIndexMethod · 0.95
selectedRowsMethod · 0.80
QModelIndexClass · 0.50

Tested by

no test coverage detected