From a39b9bb410593edf105be3ce808b6bfd94f95cde Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 11 Apr 2013 07:19:51 +0200 Subject: Fix frame cacheDir Get rid of the cache file. Instead, generate the cache on startup. The cache was never written since it was turned into a thread. Because of that I wrote a cleanup function, but surprisingly it didn't have much impact on the startup time, so I dropped the cache file. Also, fix destructor of SmGlobals. Call deleteLater on all Q_OBJECTS, and of course, some header cleanup. --- framecache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framecache.h') diff --git a/framecache.h b/framecache.h index 509fea6..867eda7 100644 --- a/framecache.h +++ b/framecache.h @@ -27,6 +27,9 @@ class FrameCache : public QObject { const QPixmap entry(const QString &sourcePath, const QString &when = QString()); const QString entryPath(const QString &sourcePath, const QString &when); + public slots: + void rebuild(); + private: QHash, QString> *mFrameCache; QQueue > *mDataQueue; @@ -45,9 +48,8 @@ class FrameCacheGenerator : public QThread { explicit FrameCacheGenerator(QObject *parent = 0); void init(QSemaphore *set, QSemaphore *get, QMutex *cachemx, QQueue > *data, QHash, QString> *cache); const QString cacheFile() const { return mCacheFile; } - qint32 magic() const { return mMagic; }; + const QString cacheDir() const { return mCacheDir; } void readConfig(); - void readCache(); public slots: void run(); @@ -61,9 +63,7 @@ class FrameCacheGenerator : public QThread { QHash, QString> *mFrameCache; QString mCacheDir; QString mCacheFile; - //QString mWhen; QString mFfMpegPath; - const qint32 mMagic; const QString mCacheSubDir; const QString mCacheFileName; -- cgit v1.2.3-70-g09d2