diff options
author | Arno <arno@disconnect.de> | 2018-01-02 22:09:07 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-01-02 22:09:07 +0100 |
commit | b5dc8c10367537aec8ce7c061f608ca896ec9f36 (patch) | |
tree | 3038603c5b485b8a92593a2b24295327d9b71702 /ShemovCleaner.pro | |
parent | c77061d4d19de23c805ccbcc7cc229b221d4c1d5 (diff) | |
download | ShemovCleaner-b5dc8c10367537aec8ce7c061f608ca896ec9f36.tar.gz ShemovCleaner-b5dc8c10367537aec8ce7c061f608ca896ec9f36.tar.bz2 ShemovCleaner-b5dc8c10367537aec8ce7c061f608ca896ec9f36.zip |
Implement cache for FileWidget
Some data-gathering is quite expensive and requires a QProcess, like
getting the duration, so cache it in memory using QCache. Once the cache
is filled, the UI is much snappier.
This simplifies gatherData() a bit. It's still quite a long function,
but now it doesn't create the QStandardItems any more. I moved it to a
separate function.
Diffstat (limited to 'ShemovCleaner.pro')
-rw-r--r-- | ShemovCleaner.pro | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ShemovCleaner.pro b/ShemovCleaner.pro index 3c2522c..cc357f6 100644 --- a/ShemovCleaner.pro +++ b/ShemovCleaner.pro @@ -35,7 +35,8 @@ HEADERS += actorwidget.h \ torrentdisplay.h \ torrentparser.h \ torrentwidget.h \ - viewer.h + viewer.h \ + cachedfiledata.h SOURCES += actorwidget.cpp \ configurationwidget.cpp \ filecopier.cpp \ @@ -52,5 +53,6 @@ SOURCES += actorwidget.cpp \ torrentdisplay.cpp \ torrentparser.cpp \ torrentwidget.cpp \ - viewer.cpp + viewer.cpp \ + cachedfiledata.cpp RESOURCES += shemovcleaner.qrc |