added a test that watches test/testfile which can be given the browser as bookmark file - it work's; refs https://dev.swisssign.com/projects/swissstick/ticket/980; refs #150
This commit is contained in:
@@ -81,8 +81,14 @@ class FileStorage: public Storage {
|
||||
}
|
||||
private Q_SLOTS:
|
||||
void setupWatcher() {
|
||||
_watcher.removePaths(_watcher.files());
|
||||
if (readable()) _watcher.addPath(_file.fileName());
|
||||
bool watching(_watcher.files().size());
|
||||
if (watching) // remove watchlist if already existent
|
||||
_watcher.removePaths(_watcher.files());
|
||||
if (readable()) { // add file to watchlist
|
||||
_watcher.addPath(_file.fileName());
|
||||
if (!watching) // send change event if file is initially created
|
||||
changed();
|
||||
}
|
||||
}
|
||||
private:
|
||||
QFile _file;
|
||||
|
Reference in New Issue
Block a user