From 7d2e0fce392413c7a4f4292ccc0dd5e5f45f496f Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Thu, 8 Dec 2016 22:26:50 +0100 Subject: Improve and simplify the design/interface of TreeItem --- src/library/browse/foldertreemodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/library/browse/foldertreemodel.cpp') diff --git a/src/library/browse/foldertreemodel.cpp b/src/library/browse/foldertreemodel.cpp index 62b28afc41..3c51828f15 100644 --- a/src/library/browse/foldertreemodel.cpp +++ b/src/library/browse/foldertreemodel.cpp @@ -38,14 +38,14 @@ bool FolderTreeModel::hasChildren(const QModelIndex& parent) const { * However, for, buid-in items such as 'Quick Links' there exist * child items at init time */ - if(item->dataPath().toString() == QUICK_LINK_NODE) + if(item->getData().toString() == QUICK_LINK_NODE) return true; //Can only happen on Windows - if(item->dataPath().toString() == DEVICE_NODE) + if(item->getData().toString() == DEVICE_NODE) return true; - // In all other cases the dataPath() points to a folder - QString folder = item->dataPath().toString(); + // In all other cases the getData() points to a folder + QString folder = item->getData().toString(); return directoryHasChildren(folder); } @@ -63,7 +63,7 @@ bool FolderTreeModel::directoryHasChildren(const QString& path) const { * QDIR::EntryInfoList returns a full QFileInfolist * * - * QDir dir(item->dataPath().toString()); + * QDir dir(item->getData().toString()); * QFileInfoList all = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); * return (all.count() > 0); * -- cgit v1.2.3