]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodel.cpp
Merge branch 'KDE/4.10'
[dolphin.git] / src / kitemviews / kfileitemmodel.cpp
index 61f512a8e5505a110a351525ee6592e8b2093f96..f46182b450690db1eb43b56e75d97604b3c0e0e2 100644 (file)
@@ -58,7 +58,6 @@ KFileItemModel::KFileItemModel(QObject* parent) :
     m_urlsToExpand()
 {
     m_dirLister = new KFileItemModelDirLister(this);
-    m_dirLister->setAutoUpdate(true);
     m_dirLister->setDelayedMimeTypes(true);
 
     const QWidget* parentWidget = qobject_cast<QWidget*>(parent);
@@ -716,6 +715,8 @@ void KFileItemModel::slotCanceled()
 {
     m_maximumUpdateIntervalTimer->stop();
     dispatchPendingItemsToInsert();
+
+    emit directoryLoadingCanceled();
 }
 
 void KFileItemModel::slotNewItems(const KFileItemList& items)
@@ -1497,7 +1498,7 @@ int KFileItemModel::expandedParentsCountCompare(const ItemData* a, const ItemDat
     if (index > maxIndex) {
         index = maxIndex;
     }
-    while ((pathA.at(index) != QLatin1Char('/') || pathB.at(index) != QLatin1Char('/')) && index > 0) {
+    while (index > 0 && (pathA.at(index) != QLatin1Char('/') || pathB.at(index) != QLatin1Char('/'))) {
         --index;
     }