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
qfsfileengine_iterator.cpp
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
5#include "qfileinfo_p.h"
6#include "qvariant.h"
7
8#ifndef QT_NO_FILESYSTEMITERATOR
9
11
13 const QStringList &filterNames)
16{
17}
18
22
24{
25 if (!nativeIterator)
26 return false;
27
30 if (nativeIterator->advance(entry, data)) {
32 return true;
33 } else {
34 nativeIterator.reset();
35 return false;
36 }
37}
38
43
48
50
51#endif // QT_NO_FILESYSTEMITERATOR
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.
QString currentFileName() const override
This pure virtual function returns the name of the current directory entry, excluding the path.
QFileInfo currentFileInfo() const override
The virtual function returns a QFileInfo for the current directory entry.
QFSFileEngineIterator(const QString &path, QDir::Filters filters, const QStringList &filterNames)
bool advance() override
This pure virtual function advances the iterator to the next directory entry; if the operation was su...
QString fileName() const
bool advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData)
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint entry
GLsizei const GLchar *const * path
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]