From 5d10603fffb598d9ccbcda0e59766707e3f43870 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 28 Aug 2015 09:56:42 -0400 Subject: 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. --- lumina-fm/widgets/DirWidget.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lumina-fm/widgets/DirWidget.h') 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 #include #include - +#include #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 -- cgit