QDirListing: add API docs for DirEntry
It's part of the public API. Drive-by change: add `\ingroup io` to QDirListing too. Fixes: QTBUG-127152 Change-Id: Ic327cbb8742dfd323cae9f7135a7590d14819869 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8fc89a4637214a0724a2abb5f47c16487d4fffea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
78e167ab7b
commit
f5971dc78a
@ -6,6 +6,7 @@
|
|||||||
\since 6.8
|
\since 6.8
|
||||||
\class QDirListing
|
\class QDirListing
|
||||||
\inmodule QtCore
|
\inmodule QtCore
|
||||||
|
\ingroup io
|
||||||
\brief The QDirListing class provides an STL-style iterator for directory entries.
|
\brief The QDirListing class provides an STL-style iterator for directory entries.
|
||||||
|
|
||||||
You can use QDirListing to navigate entries of a directory one at a time.
|
You can use QDirListing to navigate entries of a directory one at a time.
|
||||||
@ -718,6 +719,25 @@ QDirListing::const_iterator &QDirListing::const_iterator::operator++()
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class QDirListing::DirEntry
|
||||||
|
\inmodule QtCore
|
||||||
|
\ingroup io
|
||||||
|
|
||||||
|
Dereferencing a valid QDirListing::const_iterator returns a DirEntry
|
||||||
|
object.
|
||||||
|
|
||||||
|
DirEntry offers a subset of QFileInfo's API (for example, fileName(),
|
||||||
|
filePath(), exists()). Internally, DirEntry only constructs a QFileInfo
|
||||||
|
object if needed, that is, if the info hasn't been already fetched
|
||||||
|
by other system functions. You can use DirEntry::fileInfo() to get a
|
||||||
|
QFileInfo. For example:
|
||||||
|
|
||||||
|
\snippet code/src_corelib_io_qdirlisting.cpp 3
|
||||||
|
|
||||||
|
\snippet code/src_corelib_io_qdirlisting.cpp 4
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QFileInfo QDirListing::DirEntry::fileInfo() const
|
\fn QFileInfo QDirListing::DirEntry::fileInfo() const
|
||||||
\fn QString QDirListing::DirEntry::fileName() const
|
\fn QString QDirListing::DirEntry::fileName() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user