From ea2ed61cd12eec48b66811df0e43dd40e546374a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 16 Dec 2011 22:01:04 +0100 Subject: Update the roles if items have been changed The code "// TODO..." in slotItemsChanged() obviously was not sufficient ;-) BUG: 288691 BUG: 288824 BUG: 288921 FIXED-IN: 4.8.0 --- src/kitemviews/kfileitemmodelrolesupdater.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/kitemviews/kfileitemmodelrolesupdater.h') diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index 85f9c293c..993cc5244 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -107,12 +107,22 @@ private slots: void slotItemsChanged(const KItemRangeList& itemRanges, const QSet& roles); + /** + * Is invoked after a preview has been received successfully. + * @see startPreviewJob() + */ void slotGotPreview(const KFileItem& item, const QPixmap& pixmap); + + /** + * Is invoked after generating a preview has failed. + * @see startPreviewJob() + */ void slotPreviewFailed(const KFileItem& item); /** * Is invoked when the preview job has been finished and * removes the job from the m_previewJobs list. + * @see startPreviewJob() */ void slotPreviewJobFinished(KJob* job); @@ -120,6 +130,19 @@ private slots: void resolveNextPendingRoles(); private: + /** + * Updates the roles for the given item ranges. The roles for the currently + * visible items will get updated first. + */ + void startUpdating(const KItemRangeList& itemRanges); + + /** + * Creates previews for the items starting from the first item of the + * given list. + * @see slotGotPreview() + * @see slotPreviewFailed() + * @see slotPreviewJobFinished() + */ void startPreviewJob(const KFileItemList& items); bool hasPendingRoles() const; -- cgit v1.3.1