]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Make calls to resolveNextPendingRoles and resolveNextSortRole delayed
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 6 Jun 2013 06:49:12 +0000 (08:49 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 6 Jun 2013 06:49:12 +0000 (08:49 +0200)
This prevents that functions that call these indirectly call themselves
recursively and cause trouble.

BUG: 320791

src/kitemviews/kfileitemmodelrolesupdater.cpp

index 644605c5720235867a825a0c17c6a7564a3789d8..9bc288df1a016fa56e4d43fc4a99f3873b632cf5 100644 (file)
@@ -898,12 +898,12 @@ void KFileItemModelRolesUpdater::startUpdating()
         startPreviewJob(itemsToResolve);
 
         // Determine the icons asynchronously as fast as possible.
         startPreviewJob(itemsToResolve);
 
         // Determine the icons asynchronously as fast as possible.
-        resolveNextPendingRoles();
+        QTimer::singleShot(0, this, SLOT(resolveNextPendingRoles()));
     } else {
         m_pendingIndexes = indexes;
         // Trigger the asynchronous resolving of all roles.
         m_state = ResolvingAllRoles;
     } else {
         m_pendingIndexes = indexes;
         // Trigger the asynchronous resolving of all roles.
         m_state = ResolvingAllRoles;
-        resolveNextPendingRoles();
+        QTimer::singleShot(0, this, SLOT(resolveNextPendingRoles()));
     }
 }
 
     }
 }
 
@@ -1002,7 +1002,7 @@ void KFileItemModelRolesUpdater::updateChangedItems()
             // asynchronous determination of the sort role.
             killPreviewJob();
             m_state = ResolvingSortRole;
             // asynchronous determination of the sort role.
             killPreviewJob();
             m_state = ResolvingSortRole;
-            resolveNextSortRole();
+            QTimer::singleShot(0, this, SLOT(resolveNextSortRole()));
         }
 
         return;
         }
 
         return;
@@ -1050,7 +1050,7 @@ void KFileItemModelRolesUpdater::updateChangedItems()
         if (!resolvingInProgress) {
             // Trigger the asynchronous resolving of the changed roles.
             m_state = ResolvingAllRoles;
         if (!resolvingInProgress) {
             // Trigger the asynchronous resolving of the changed roles.
             m_state = ResolvingAllRoles;
-            resolveNextPendingRoles();
+            QTimer::singleShot(0, this, SLOT(resolveNextPendingRoles()));
         }
     }
 }
         }
     }
 }