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
qfilesystemiterator_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 QFILESYSTEMITERATOR_P_H
5#define QFILESYSTEMITERATOR_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 <QtCore/qglobal.h>
19
20#ifndef QT_NO_FILESYSTEMITERATOR
21
22#include <QtCore/qdir.h>
23#include <QtCore/qstringlist.h>
24
25#include <QtCore/private/qfilesystementry_p.h>
26#include <QtCore/private/qfilesystemmetadata_p.h>
27
28#if !defined(Q_OS_WIN)
29#include <private/qstringconverter_p.h>
30#endif
31
32#include <memory>
33
35
37{
38public:
41
42 bool advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData);
43
44private:
45 QString dirPath;
46
47 // Platform-specific data
48#if defined(Q_OS_WIN)
50 HANDLE findFileHandle;
51 QStringList uncShares;
52 bool uncFallback;
53 int uncShareIndex;
54 bool onlyDirs;
55#else
56 struct DirStreamCloser {
57 void operator()(QT_DIR *dir) { if (dir) QT_CLOSEDIR(dir); }
58 };
59 using DirPtr = std::unique_ptr<QT_DIR, DirStreamCloser>;
60 DirPtr dir;
61
62 QT_DIRENT *dirEntry = nullptr;
63 int lastError = 0;
64 QStringDecoder toUtf16;
65#endif
66
67 Q_DISABLE_COPY_MOVE(QFileSystemIterator)
68};
69
71
72#endif // QT_NO_FILESYSTEMITERATOR
73
74#endif // include guard
\inmodule QtCore
Definition qbytearray.h:57
bool advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData)
QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters)
\inmodule QtCore
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLuint entry
QString dir
[11]
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]