diff options
author | Arno <am@disconnect.de> | 2013-06-01 06:53:34 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-06-01 06:53:34 +0200 |
commit | ac5f624734f712bce84f36cc47c0133a1382534f (patch) | |
tree | ff3f0105b341dbc91dbe4471b4a55429fe127ce4 /archivemodel.cpp | |
parent | 39223db7f24eb285af7f0b7a3b061d9a92453122 (diff) | |
download | SheMov-ac5f624734f712bce84f36cc47c0133a1382534f.tar.gz SheMov-ac5f624734f712bce84f36cc47c0133a1382534f.tar.bz2 SheMov-ac5f624734f712bce84f36cc47c0133a1382534f.zip |
Add view for new ArchiveModel
Display the new ArchiveModel in an experimental tab
Diffstat (limited to 'archivemodel.cpp')
-rw-r--r-- | archivemodel.cpp | 3 |
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); } |