diff options
author | Ken Moore <moorekou@gmail.com> | 2015-08-28 09:56:42 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-08-28 09:56:42 -0400 |
commit | 5d10603fffb598d9ccbcda0e59766707e3f43870 (patch) | |
tree | cbec0dfbda33913f5ce61bed868562adeb491837 /lumina-fm/widgets/DirWidget.h | |
parent | Remove the LFileInfo class from lumina-fm (in LuminaXDG instead) (diff) | |
download | lumina-5d10603fffb598d9ccbcda0e59766707e3f43870.tar.gz lumina-5d10603fffb598d9ccbcda0e59766707e3f43870.tar.bz2 lumina-5d10603fffb598d9ccbcda0e59766707e3f43870.zip |
Add a couple tiny timing fixes for the lumina-fm backend:
1) Rollback the directory checked timestamp by 1/2 second from teh current time when doing a sync (just in case multiple fast changes to the dir).
2) Activate the dir watcher on all the files as well (not just the dir), and send all those signals into a collection timer with a 1/10 second delay to combine any simultaneous signals/changes into a single update call.
Diffstat (limited to 'lumina-fm/widgets/DirWidget.h')
-rw-r--r-- | lumina-fm/widgets/DirWidget.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lumina-fm/widgets/DirWidget.h b/lumina-fm/widgets/DirWidget.h index 3e653ab9..55e6f8d1 100644 --- a/lumina-fm/widgets/DirWidget.h +++ b/lumina-fm/widgets/DirWidget.h @@ -15,7 +15,7 @@ #include <QLineEdit> #include <QShortcut> #include <QFileSystemWatcher> - +#include <QTimer> #include "../DirData.h" #include "DDListWidgets.h" @@ -85,6 +85,7 @@ private: QShortcut *copyFilesShort, *cutFilesShort, *pasteFilesShort, *deleteFilesShort, *refreshShort; //Watcher to determine when the dir changes QFileSystemWatcher *watcher; + QTimer *synctimer; //Functions for internal use void setupConnections(); @@ -124,10 +125,12 @@ private slots: void openTerminal(); void NewFile(); void NewDir(); + //Browser Functions void OpenContextMenu(); void SelectionChanged(); + void startSync(); //used internally to collect/pause before updating the dir signals: //Directory loading/finding signals |