int MatchDayModel::rowCount(const QModelIndex&) const
{
- int count = m_backend->matchList().count();
-
- return count;
+ return m_backend->matchCount();
}
int MatchDayModel::columnCount(const QModelIndex&) const
QSize s;
QIcon i;
- if ((match = m_backend->matchList().at(index.row())) == NULL) {
+ if ((match = m_backend->getMatch(index.row())) == NULL) {
return QVariant(QVariant::Invalid);
}
//add rows
beginInsertRows(QModelIndex(),
0,
- m_backend->matchList().count() - 1);
+ m_backend->matchCount() - 1);
endInsertRows();
- m_lastRowCount = m_backend->matchList().count() - 1;
+ m_lastRowCount = m_backend->matchCount() - 1;
// invalidate complete data
qDebug() << "MatchDayModel::emit dataChanged: " << rowCount(QModelIndex());