Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qfilesystemwatcher_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFILESYSTEMWATCHER_P_H
5#define QFILESYSTEMWATCHER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qfilesystemwatcher.h"
19
20QT_REQUIRE_CONFIG(filesystemwatcher);
21
22#include <private/qobject_p.h>
23
24#include <QtCore/qstringlist.h>
25#include <QtCore/qhash.h>
26
28
30{
32
33protected:
38
39public:
40 // fills \a files and \a directories with the \a paths it could
41 // watch, and returns a list of paths this engine could not watch
44 QStringList *directories) = 0;
45 // removes \a paths from \a files and \a directories, and returns
46 // a list of paths this engine does not know about (either addPath
47 // failed or wasn't called)
50 QStringList *directories) = 0;
51
53 void fileChanged(const QString &path, bool removed);
54 void directoryChanged(const QString &path, bool removed);
55};
56
58{
59 Q_DECLARE_PUBLIC(QFileSystemWatcher)
60
61 static QFileSystemWatcherEngine *createNativeEngine(QObject *parent);
62
63public:
65 void init();
66 void initPollerEngine();
67
70
71 // private slots
72 void fileChanged(const QString &path, bool removed);
73 void directoryChanged(const QString &path, bool removed);
74
76
77#if defined(Q_OS_WIN)
78 void winDriveLockForRemoval(const QString &);
79 void winDriveLockForRemovalFailed(const QString &);
80 void winDriveRemoved(const QString &);
81
82private:
83 QHash<QChar, QStringList> temporarilyRemovedPaths;
84#endif // Q_OS_WIN
85};
86
87
89#endif // QFILESYSTEMWATCHER_P_H
QFileSystemWatcherEngine(QObject *parent)
virtual QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories)=0
virtual QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories)=0
void directoryChanged(const QString &path, bool removed)
void fileChanged(const QString &path, bool removed)
void connectEngine(QFileSystemWatcherEngine *e)
void fileChanged(const QString &path, bool removed)
QFileSystemWatcherEngine * native
QFileSystemWatcherEngine * poller
void directoryChanged(const QString &path, bool removed)
QObject * parent
Definition qobject.h:73
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLsizei const GLuint * paths
GLsizei const GLchar *const * path
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
#define Q_SIGNALS
QStringList files
[8]