diff --git a/windowscontactbackend.cpp b/windowscontactbackend.cpp index a3572ef2b7f8dc587469068004ce39673ddc7cea..ea6b3c2705f7875d89c5c76b22041e1795ddfa0c 100644 --- a/windowscontactbackend.cpp +++ b/windowscontactbackend.cpp @@ -183,9 +183,6 @@ WindowsContactEditor::addNew(Person *item) file.write(doc.toByteArray()); file.close(); - //Add it to the collection - addExisting(item); - return true; } @@ -222,11 +219,11 @@ WindowsContactBackend::load() QtConcurrent::run(this, &WindowsContactBackend::loadRun); watcher_->addPath(QStandardPaths::writableLocation (QStandardPaths::HomeLocation) + "/Contacts"); -//FIXME: Temporary disabling watch on the dir because of double add -// QObject::connect(watcher_, &QFileSystemWatcher::directoryChanged, [=](QString path) { -// Q_UNUSED(path) -// QtConcurrent::run(this, &WindowsContactBackend::loadRun); -// }); + + QObject::connect(watcher_, &QFileSystemWatcher::directoryChanged, [=](QString path) { + Q_UNUSED(path) + QtConcurrent::run(this, &WindowsContactBackend::loadRun); + }); return true; }