correctly, and emit DolphinDetailsViewExpander's completed() signal
only if the folder loading is really finished. This fixes possible
problems when restoring the current item and scroll position of the
view if these require a preceding folder expansion.
svn path=/trunk/KDE/kdebase/apps/; revision=
1090926
m_dirLister = m_dolphinModel->dirLister();
Q_ASSERT(m_dirLister != 0);
m_dirLister = m_dolphinModel->dirLister();
Q_ASSERT(m_dirLister != 0);
- if(!urlsToExpand.isEmpty()) {
- // The URLs must be sorted. E.g. /home/user/ cannot be expanded before /home/
- // because it is not known to the dir model before.
- m_urlsToExpand = urlsToExpand.toList();
- qSort(m_urlsToExpand);
+ // The URLs must be sorted. E.g. /home/user/ cannot be expanded before /home/
+ // because it is not known to the dir model before.
+ m_urlsToExpand = urlsToExpand.toList();
+ qSort(m_urlsToExpand);
- // The dir lister must have completed the folder listing before a subfolder can be expanded.
- connect(m_dirLister, SIGNAL(completed()), this, SLOT(slotDirListerCompleted()));
- }
- else {
- // There is nothing to expand - destroy this object
- deleteLater();
- }
+ // The dir lister must have completed the folder listing before a subfolder can be expanded.
+ connect(m_dirLister, SIGNAL(completed()), this, SLOT(slotDirListerCompleted()));
}
DolphinDetailsViewExpander::~DolphinDetailsViewExpander()
}
DolphinDetailsViewExpander::~DolphinDetailsViewExpander()
const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
m_detailsView->expand(proxyIndex);
}
const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
m_detailsView->expand(proxyIndex);
}
-
- if(m_urlsToExpand.isEmpty()) {
emit completed();
stop();
}
emit completed();
stop();
}
- m_expanderActive = false;
-
KDirLister* dirLister = m_viewAccessor.dirLister();
dirLister->openUrl(url, reload ? KDirLister::Reload : KDirLister::NoFlags);
KDirLister* dirLister = m_viewAccessor.dirLister();
dirLister->openUrl(url, reload ? KDirLister::Reload : KDirLister::NoFlags);