diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-08-18 11:10:09 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-09-07 15:15:28 +0200 |
commit | 66b633bbc1f9dd27825eb87030dbad134c1d24c8 (patch) | |
tree | 4be930597dfa78afe9038888cd1b0ed6b6a136a5 /src/corelib/io/qdir.cpp | |
parent | cbae09fe42d1381e00a226972714a6fb0171da66 (diff) |
Port QDir to qsizetype [3/3]: API
[ChangeLog][QtCore][QDir] The count() function now returns, and the
indexing operator now takes, qsizetype (was: uint and int,
respectively).
[ChangeLog][Potentially Source-Incompatible Changes][QDir] The count()
function now returns qsizetype (was: uint).
Task-number: QTBUG-103525
Change-Id: Ib84af36f6a95d9a0d1090a2d6fb973a4e363550c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r-- | src/corelib/io/qdir.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 3ee3088ee8..624efdafc9 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1262,9 +1262,12 @@ void QDir::setSorting(SortFlags sort) Equivalent to entryList().count(). + \note In Qt versions prior to 6.5, this function returned \c{uint}, not + \c{qsizetype}. + \sa operator[](), entryList() */ -uint QDir::count() const +qsizetype QDir::count(QT6_IMPL_NEW_OVERLOAD) const { const QDirPrivate* d = d_ptr.constData(); d->initFileLists(*this); @@ -1276,9 +1279,11 @@ uint QDir::count() const names. Equivalent to entryList().at(index). \a pos must be a valid index position in the list (i.e., 0 <= pos < count()). + \note In Qt versions prior to 6.5, \a pos was an \c{int}, not \c{qsizetype}. + \sa count(), entryList() */ -QString QDir::operator[](int pos) const +QString QDir::operator[](qsizetype pos) const { const QDirPrivate* d = d_ptr.constData(); d->initFileLists(*this); |