diff options
author | Armin Berres <armin.berres@basyskom.de> | 2010-07-30 17:31:42 +0200 |
---|---|---|
committer | Sergiy Dubovik <sergiy.dubovik@nokia.com> | 2010-08-02 14:38:49 +0300 |
commit | 73161b0e4c69b7a1eefb3db7e6edbd0f4ce3bef6 (patch) | |
tree | 9e64dd42ebabf4decad30c92fb409ae5b9955b6f /src/corelib/theme/mthemedaemon.cpp | |
parent | 362e23f90e9b4ef5c4975c9456896b089600356a (diff) |
Changes: save changed statistics of most used pixmaps to disk
RevBy: Peter
Details:
So far the themedaemon only saved the statistics about most used pixmaps
when it has been terminated gracefully.
Now it will save them whenever they change (should not happen really often
when phone is used for some time) but not more often than 10 seconds.
Diffstat (limited to 'src/corelib/theme/mthemedaemon.cpp')
-rw-r--r-- | src/corelib/theme/mthemedaemon.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/corelib/theme/mthemedaemon.cpp b/src/corelib/theme/mthemedaemon.cpp index 249b110d..a9d4ab4a 100644 --- a/src/corelib/theme/mthemedaemon.cpp +++ b/src/corelib/theme/mthemedaemon.cpp @@ -53,9 +53,7 @@ MThemeDaemon::MThemeDaemon() : MThemeDaemon::~MThemeDaemon() { - if (!mostUsedPixmaps.save(systemThemeCacheDirectory() + QDir::separator() + currentThemeName + QDir::separator() + "preload.list")) { - // TODO: print out warning - } + mostUsedPixmaps.save(); mostUsedPixmaps.clear(); qDeleteAll(themeImageDirs); @@ -332,9 +330,7 @@ bool MThemeDaemon::activateTheme(const QString &newTheme, const QString &locale, // 2. save the most used list for the old theme if (!currentThemeName.isEmpty()) { - if (!mostUsedPixmaps.save(systemThemeCacheDirectory() + QDir::separator() + currentThemeName + QDir::separator() + "preload.list")) { - // TODO: print out warning - } + mostUsedPixmaps.save(); } // 3. release all most used pixmaps @@ -374,9 +370,7 @@ bool MThemeDaemon::activateTheme(const QString &newTheme, const QString &locale, reloadImagePaths(locale); // 6. load the "preload" list - if (!mostUsedPixmaps.load(systemThemeCacheDirectory() + QDir::separator() + currentThemeName + QDir::separator() + "preload.list")) { - // TODO: print out warning - } + mostUsedPixmaps.load(); return true; } |