summaryrefslogtreecommitdiffstats
path: root/archivemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'archivemodel.cpp')
-rw-r--r--archivemodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/archivemodel.cpp b/archivemodel.cpp
index 874b252..3bae59b 100644
--- a/archivemodel.cpp
+++ b/archivemodel.cpp
@@ -42,6 +42,7 @@ void ArchiveModel::setOrder(int order) {
void ArchiveModel::populateBySeriesName() {
SmTreeItem *rootItem = new SmTreeItem(NumFields);
+ //fetchChildren(rootItem);
fetchSeries(QVariant(), rootItem);
fetchParts(rootItem);
setRoot(rootItem);
@@ -124,7 +125,7 @@ void ArchiveModel::fetchParts(SmTreeItem *parent){
partsQuery.exec();
while(partsQuery.next()){
QList<QVariant> partData;
- partData << parent->data(Name) << parent->data(SeriesId) << partsQuery.value(0) << partsQuery.value(1) << SeriesPartNode << partsQuery.value(2) << partsQuery.value(3) << QVariant();
+ partData << parent->child(i)->data(Name) << parent->child(i)->data(SeriesId) << partsQuery.value(0) << partsQuery.value(1) << SeriesPartNode << partsQuery.value(2) << partsQuery.value(3) << QVariant();
SmTreeItem *partItem = new SmTreeItem(partData, parent->child(i));
parent->child(i)->appendChild(partItem);
}