From 5021bcc0a779f0f7847eaa7079949b766289da6e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 3 Jan 2018 12:02:04 -0500 Subject: Get the DesktopSettings class automatically providing notifications about file changes. --- src-qt5/core/libLumina/DesktopSettings.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src-qt5/core/libLumina/DesktopSettings.cpp') diff --git a/src-qt5/core/libLumina/DesktopSettings.cpp b/src-qt5/core/libLumina/DesktopSettings.cpp index f1c74bc5..509afa83 100644 --- a/src-qt5/core/libLumina/DesktopSettings.cpp +++ b/src-qt5/core/libLumina/DesktopSettings.cpp @@ -17,6 +17,7 @@ // === PUBLIC === DesktopSettings::DesktopSettings(QObject *parent) : QObject(parent){ + qRegisterMetaType< DesktopSettings::File >("DesktopSettings::File"); watcher = 0; runmode = DesktopSettings::UserFull; } @@ -275,6 +276,7 @@ QString DesktopSettings::rel_path(DesktopSettings::File file){ //=== PRIVATE SLOTS === void DesktopSettings::fileChanged(QString file){ + //qDebug() << "Got File Changed:" << file; //QFileSystemWatcher change detected if(!watcher->files().contains(file)){ //Make sure this file stays watched for changes @@ -287,6 +289,7 @@ void DesktopSettings::fileChanged(QString file){ QList< DesktopSettings::File > types = files.keys(); for(int i=0; i