mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
merge QFileSystemWatcherEngine into QFileSystemWatcherEngineUnix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ec45dcff28
commit
d772f70c77
3 changed files with 8 additions and 31 deletions
|
@ -298,7 +298,6 @@ QStringList QFileSystemWatcher::files() const
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qfilesystemwatcher.h"
|
||||
#include "moc_qfilesystemwatcher_p.h"
|
||||
|
||||
#endif // QT_NO_FILESYSTEMWATCHER
|
||||
|
||||
|
|
|
@ -38,38 +38,12 @@
|
|||
#ifndef QT_NO_FILESYSTEMWATCHER
|
||||
|
||||
#include "qobject_p.h"
|
||||
#include "qfilesystemwatcher_unix_p.h"
|
||||
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileSystemWatcherEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
protected:
|
||||
inline QFileSystemWatcherEngine()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
// fills \a files and \a directories with the \a paths it could
|
||||
// watch, and returns a list of paths this engine could not watch
|
||||
virtual QStringList addPaths(const QStringList &paths,
|
||||
QStringList *files,
|
||||
QStringList *directories) = 0;
|
||||
// removes \a paths from \a files and \a directories, and returns
|
||||
// a list of paths this engine does not know about (either addPath
|
||||
// failed or wasn't called)
|
||||
virtual QStringList removePaths(const QStringList &paths,
|
||||
QStringList *files,
|
||||
QStringList *directories) = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
void fileChanged(const QString &path, bool removed);
|
||||
void directoryChanged(const QString &path, bool removed);
|
||||
};
|
||||
|
||||
class QFileSystemWatcherPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFileSystemWatcher)
|
||||
|
@ -78,7 +52,7 @@ public:
|
|||
QFileSystemWatcherPrivate();
|
||||
void init();
|
||||
|
||||
QFileSystemWatcherEngine *watcher;
|
||||
QFileSystemWatcherEngineUnix *watcher;
|
||||
QStringList files, directories;
|
||||
|
||||
// private slots
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystemwatcher_p.h"
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_FILESYSTEMWATCHER
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
class QFileSystemWatcherEngineUnix : public QFileSystemWatcherEngine
|
||||
class QFileSystemWatcherEngineUnix : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -60,6 +60,10 @@ public:
|
|||
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
|
||||
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
|
||||
|
||||
Q_SIGNALS:
|
||||
void fileChanged(const QString &path, bool removed);
|
||||
void directoryChanged(const QString &path, bool removed);
|
||||
|
||||
private Q_SLOTS:
|
||||
void timeout();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue