Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QFILESYSTEMWATCHER_P_H
6
#
define
QFILESYSTEMWATCHER_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
"qfilesystemwatcher.h"
20
21
QT_REQUIRE_CONFIG
(
filesystemwatcher
);
22
23
#
include
<
private
/
qobject_p
.
h
>
24
25
#
include
<
QtCore
/
qstringlist
.
h
>
26
#
include
<
QtCore
/
qhash
.
h
>
27
28
QT_BEGIN_NAMESPACE
29
30
class
QFileSystemWatcherEngine :
public
QObject
31
{
32
Q_OBJECT
33
34
protected
:
35
inline
QFileSystemWatcherEngine(QObject *parent)
36
: QObject(parent)
37
{
38
}
39
40
public
:
41
// fills \a files and \a directories with the \a paths it could
42
// watch, and returns a list of paths this engine could not watch
43
virtual
QStringList addPaths(
const
QStringList &paths,
44
QStringList *files,
45
QStringList *directories) = 0;
46
// removes \a paths from \a files and \a directories, and returns
47
// a list of paths this engine does not know about (either addPath
48
// failed or wasn't called)
49
virtual
QStringList removePaths(
const
QStringList &paths,
50
QStringList *files,
51
QStringList *directories) = 0;
52
53
Q_SIGNALS:
54
void
fileChanged(
const
QString &path,
bool
removed);
55
void
directoryChanged(
const
QString &path,
bool
removed);
56
};
57
58
class
QFileSystemWatcherPrivate
:
public
QObjectPrivate
59
{
60
Q_DECLARE_PUBLIC(QFileSystemWatcher)
61
62
static
QFileSystemWatcherEngine *createNativeEngine(QObject *parent);
63
64
public
:
65
QFileSystemWatcherPrivate
();
66
void
init
();
67
void
initPollerEngine
();
68
69
QFileSystemWatcherEngine *
native
, *
poller
;
70
QStringList
files
,
directories
;
71
72
// private slots
73
void
fileChanged
(
const
QString &path,
bool
removed);
74
void
directoryChanged
(
const
QString &path,
bool
removed);
75
76
void
connectEngine
(QFileSystemWatcherEngine *e);
77
78
#
if
defined
(
Q_OS_WIN
)
79
void
winDriveLockForRemoval
(
const
QString
&);
80
void
winDriveLockForRemovalFailed
(
const
QString
&);
81
void
winDriveRemoved
(
const
QString
&);
82
83
private
:
84
QHash
<
QChar
,
QStringList
>
temporarilyRemovedPaths
;
85
#
endif
// Q_OS_WIN
86
};
87
88
89
QT_END_NAMESPACE
90
#
endif
// QFILESYSTEMWATCHER_P_H
QFileSystemWatcherPrivate
Definition
qfilesystemwatcher_p.h:59
QFileSystemWatcherPrivate::connectEngine
void connectEngine(QFileSystemWatcherEngine *e)
Definition
qfilesystemwatcher.cpp:61
QFileSystemWatcherPrivate::fileChanged
void fileChanged(const QString &path, bool removed)
Definition
qfilesystemwatcher.cpp:98
QFileSystemWatcherPrivate::native
QFileSystemWatcherEngine * native
Definition
qfilesystemwatcher_p.h:69
QFileSystemWatcherPrivate::initPollerEngine
void initPollerEngine()
Definition
qfilesystemwatcher.cpp:88
QFileSystemWatcherPrivate::directories
QStringList directories
Definition
qfilesystemwatcher_p.h:70
QFileSystemWatcherPrivate::poller
QFileSystemWatcherEngine * poller
Definition
qfilesystemwatcher_p.h:69
QFileSystemWatcherPrivate::QFileSystemWatcherPrivate
QFileSystemWatcherPrivate()
Definition
qfilesystemwatcher.cpp:56
QFileSystemWatcherPrivate::init
void init()
Definition
qfilesystemwatcher.cpp:69
QFileSystemWatcherPrivate::directoryChanged
void directoryChanged(const QString &path, bool removed)
Definition
qfilesystemwatcher.cpp:111
QFileSystemWatcherPrivate::files
QStringList files
Definition
qfilesystemwatcher_p.h:70
QFileSystemWatcher
\inmodule QtCore
Definition
qfilesystemwatcher.h:18
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(animation)
empty_paths_pruned
static QStringList empty_paths_pruned(const QStringList &paths)
Definition
qfilesystemwatcher.cpp:277
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(filesystemwatcher)
qCDebug
#define qCDebug(category,...)
Definition
qloggingcategory.h:162
Q_STATIC_LOGGING_CATEGORY
#define Q_STATIC_LOGGING_CATEGORY(name,...)
Definition
qloggingcategory.h:154
qtbase
src
corelib
io
qfilesystemwatcher_p.h
Generated on
for Qt by
1.18.0