From 50783b0819531087266c626fa6066e8233bb0692 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 22 Aug 2011 18:24:13 +0200 Subject: Fixes for SmGlobals::FrameCache Don't generate duplicate screenshots when the same file is indexed in different paths. Part of the frameCache key was the _full_ path, not just the filename, so duplicates piled up when hovering over the same file in the filesystem and the archive. Added a cleanup function to SmGlobals::FrameCache. Also, just use QFileInfo::fileName() as part of the key. --- smglobals.h | 1 + 1 file changed, 1 insertion(+) (limited to 'smglobals.h') diff --git a/smglobals.h b/smglobals.h index 7033b34..1193522 100644 --- a/smglobals.h +++ b/smglobals.h @@ -30,6 +30,7 @@ class SmGlobals : public QObject { private: void readCache(); void grabFrame(const QString &sourceFile, QString when); + void cleanup(); const QPair prepFrame(const QString &sourceFile, QString when); QHash, QString> mFrameCache; const qint32 mMagic; -- cgit v1.2.3-70-g09d2