"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/c2bFileSystemWatcher.cpp" between
cb2bib-1.9.9.tar.gz and cb2bib-2.0.0.tar.gz

About: cb2Bib is a multiplatform application for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.

c2bFileSystemWatcher.cpp  (cb2bib-1.9.9):c2bFileSystemWatcher.cpp  (cb2bib-2.0.0)
/*************************************************************************** /***************************************************************************
* Copyright (C) 2004-2018 by Pere Constans * Copyright (C) 2004-2019 by Pere Constans
* constans@molspaces.com * constans@molspaces.com
* cb2Bib version 1.9.9. Licensed under the GNU GPL version 3. * cb2Bib version 2.0.0. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution. * See the LICENSE file that comes with this distribution.
***************************************************************************/ ***************************************************************************/
#include "c2bFileSystemWatcher.h" #include "c2bFileSystemWatcher.h"
#include <QTimer> #include <QTimer>
/** /**
Workaround to avoid reading a file when external writing has not yet finishe d Workaround to avoid reading a file when external writing has not yet finishe d
*/ */
c2bFileSystemWatcher::c2bFileSystemWatcher(QObject* parento) : QObject(parento) c2bFileSystemWatcher::c2bFileSystemWatcher(QObject* parento) : QObject(parento)
{ {
connect(&_filewatcher, SIGNAL(fileChanged(const QString&)), this, SLOT(waitF orSaved(const QString&))); connect(&_filewatcher, SIGNAL(fileChanged(QString)), this, SLOT(waitForSaved (QString)));
} }
void c2bFileSystemWatcher::waitForSaved(const QString& path) void c2bFileSystemWatcher::waitForSaved(const QString& path)
{ {
_path = path; _path = path;
QTimer::singleShot(500, this, SLOT(fileSaved())); QTimer::singleShot(500, this, SLOT(fileSaved()));
} }
void c2bFileSystemWatcher::fileSaved() void c2bFileSystemWatcher::fileSaved()
{ {
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)