From: Frank Reininghaus Date: Thu, 6 Jun 2013 06:49:12 +0000 (+0200) Subject: Make calls to resolveNextPendingRoles and resolveNextSortRole delayed X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/f11456452333df76e80f8db49ed4da91e6cc9b32 Make calls to resolveNextPendingRoles and resolveNextSortRole delayed This prevents that functions that call these indirectly call themselves recursively and cause trouble. BUG: 320791 --- diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index 644605c57..9bc288df1 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -898,12 +898,12 @@ void KFileItemModelRolesUpdater::startUpdating() 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; - resolveNextPendingRoles(); + QTimer::singleShot(0, this, SLOT(resolveNextPendingRoles())); } } @@ -1002,7 +1002,7 @@ void KFileItemModelRolesUpdater::updateChangedItems() // asynchronous determination of the sort role. killPreviewJob(); m_state = ResolvingSortRole; - resolveNextSortRole(); + QTimer::singleShot(0, this, SLOT(resolveNextSortRole())); } return; @@ -1050,7 +1050,7 @@ void KFileItemModelRolesUpdater::updateChangedItems() if (!resolvingInProgress) { // Trigger the asynchronous resolving of the changed roles. m_state = ResolvingAllRoles; - resolveNextPendingRoles(); + QTimer::singleShot(0, this, SLOT(resolveNextPendingRoles())); } } }