projects
/
quandoparte
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54f35c1
)
Added calls to ensure the model is updated
author
Luciano Montanaro
<mikelima@cirulla.net>
Sat, 26 Nov 2011 18:02:10 +0000
(19:02 +0100)
committer
Luciano Montanaro
<mikelima@cirulla.net>
Tue, 27 Dec 2011 22:19:11 +0000
(23:19 +0100)
application/stationlistmodel.cpp
patch
|
blob
|
history
diff --git
a/application/stationlistmodel.cpp
b/application/stationlistmodel.cpp
index
d0d12a8
..
1dc66b8
100644
(file)
--- a/
application/stationlistmodel.cpp
+++ b/
application/stationlistmodel.cpp
@@
-44,6
+44,7
@@
bool StationListModel::load(const QString &filename)
qDebug() << "loading file:" << fi.absoluteFilePath();
emit layoutAboutToBeChanged();
+ beginInsertRows(QModelIndex(), 0, 0);
if (!file.open(QFile::ReadOnly | QFile::Text)) {
qDebug() << "cannot open file:" << filename;
return false;
@@
-70,6
+71,7
@@
bool StationListModel::load(const QString &filename)
return false;
}
emit layoutChanged();
+ endInsertRows();
return true;
}