From 85b0ed6a6387e153e9ea205a220fee480ca1d860 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 29 Jun 2008 16:42:59 +0000 Subject: Don't grey out an invalid preview immediately, but with a small timeout. This prevents a flickering if the new preview can be generated within a small timeframe. BUG: 165317 svn path=/trunk/KDE/kdebase/apps/; revision=825942 --- src/infosidebarpage.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/infosidebarpage.h') diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h index f2d63de0e..ef451169c 100644 --- a/src/infosidebarpage.h +++ b/src/infosidebarpage.h @@ -93,6 +93,12 @@ private slots: */ void slotInfoTimeout(); + /** + * Marks the currently shown preview as outdated + * by greying the content. + */ + void markOutdatedPreview(); + /** * Is invoked if no preview is available for the item. In this * case the icon will be shown. @@ -113,8 +119,6 @@ private slots: void slotLeftDirectory(const QString& directory); private: - enum { TimerDelay = 300 }; - /** * Checks whether the an URL is repesented by a place. If yes, * then the place icon and name are shown instead of a preview. @@ -162,6 +166,7 @@ private: bool m_initialized; bool m_pendingPreview; QTimer* m_infoTimer; + QTimer* m_outdatedPreviewTimer; KUrl m_shownUrl; // URL that is shown as info KUrl m_urlCandidate; // URL candidate that will replace m_shownURL after a delay KFileItem m_fileItem; // file item for m_shownUrl if available (otherwise null) -- cgit v1.3