projects
/
buliscores
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- first experiments with QJson serialization
[buliscores]
/
src
/
src
/
matchdaymodel.cpp
diff --git
a/src/src/matchdaymodel.cpp
b/src/src/matchdaymodel.cpp
index
0fdedf3
..
9053229
100644
(file)
--- a/
src/src/matchdaymodel.cpp
+++ b/
src/src/matchdaymodel.cpp
@@
-23,9
+23,7
@@
MatchDayModel::MatchDayModel(QObject *parent, MatchDayBackend *backend) :
int MatchDayModel::rowCount(const QModelIndex&) const
{
int MatchDayModel::rowCount(const QModelIndex&) const
{
- int count = m_backend->matchList().count();
-
- return count;
+ return m_backend->matchCount();
}
int MatchDayModel::columnCount(const QModelIndex&) const
}
int MatchDayModel::columnCount(const QModelIndex&) const
@@
-40,7
+38,7
@@
QVariant MatchDayModel::data(const QModelIndex& index, int role) const
QSize s;
QIcon i;
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);
}
return QVariant(QVariant::Invalid);
}
@@
-208,10
+206,10
@@
void MatchDayModel::onUpdateFinished(int)
//add rows
beginInsertRows(QModelIndex(),
0,
//add rows
beginInsertRows(QModelIndex(),
0,
- m_backend->matchList().count() - 1);
+ m_backend->matchCount() - 1);
endInsertRows();
endInsertRows();
- m_lastRowCount = m_backend->matchList().count() - 1;
+ m_lastRowCount = m_backend->matchCount() - 1;
// invalidate complete data
qDebug() << "MatchDayModel::emit dataChanged: " << rowCount(QModelIndex());
// invalidate complete data
qDebug() << "MatchDayModel::emit dataChanged: " << rowCount(QModelIndex());