summaryrefslogtreecommitdiffstats
path: root/propertiesdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'propertiesdialog.cpp')
-rw-r--r--propertiesdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/propertiesdialog.cpp b/propertiesdialog.cpp
index 485df6b..2068cdf 100644
--- a/propertiesdialog.cpp
+++ b/propertiesdialog.cpp
@@ -66,7 +66,7 @@ void PropertiesDialog::populate(int seriesPartId){
mDisplayModel->setRoot(root);
//setup caption
- QModelIndex seriesIdx = mSeriesModel->findRecursive(seriesPartId, SeriesTreeModel::SeriesPartId, QModelIndex());
+ QModelIndex seriesIdx = mSeriesModel->findRecursive(seriesPartId, SeriesTreeModel::SeriesPartId, mSeriesModel->rootIndex());
Q_ASSERT(seriesIdx.isValid());
QString captionString = QString(tr("Properties for %1")).arg(mSeriesModel->index(seriesIdx.row(), SeriesTreeModel::Name, seriesIdx.parent()).data().toString());
mCaption->setText(captionString);
@@ -88,7 +88,7 @@ void PropertiesDialog::showPicture(QModelIndex current, QModelIndex previous){
QPixmap pic = SmGlobals::instance()->frameCache()->entry(current.data().toString());
mPictureLabel->setPixmap(pic);
}else if(nodeType == PictureFileNode){
- QModelIndex fileIdx = mFilesModel->findRecursive(fileId, FilesTreeModel::FilesId, mFilesModel->index(0, 0, QModelIndex()));
+ QModelIndex fileIdx = mFilesModel->findRecursive(fileId, FilesTreeModel::FilesId, mFilesModel->rootIndex());
if(fileIdx.isValid()){
QString fullPath = fileIdx.data(FilesTreeModel::FullPathRole).toString();
mPictureLabel->setPixmap(fullPath);