QFileInfo: keep member function overloads in Qt7 too

The goal is to use overloading instead of default args that are
non-trivial.

Task-number: QTBUG-98117
Pick-to: 6.6
Change-Id: I120befcbab2afbfe5894bfffe6a2d882d8efd250
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Ahmad Samir 2023-07-07 19:00:40 +03:00 committed by Marc Mutz
parent 508629522d
commit 71d9ebfb1f

View File

@ -151,7 +151,6 @@ public:
qint64 size() const;
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
QDateTime birthTime() const { return fileTime(QFile::FileBirthTime); }
QDateTime metadataChangeTime() const { return fileTime(QFile::FileMetadataChangeTime); }
QDateTime lastModified() const { return fileTime(QFile::FileModificationTime); }
@ -163,25 +162,6 @@ public:
QDateTime lastModified(const QTimeZone &tz) const { return fileTime(QFile::FileModificationTime, tz); }
QDateTime lastRead(const QTimeZone &tz) const { return fileTime(QFile::FileAccessTime, tz); }
QDateTime fileTime(QFile::FileTime time, const QTimeZone &tz) const;
#else
QDateTime birthTime(const QTimeZone &tz = QTimeZone::LocalTime) const
{
return fileTime(QFile::FileBirthTime, tz);
}
QDateTime metadataChangeTime(const QTimeZone &tz = QTimeZone::LocalTime) const
{
return fileTime(QFile::FileMetadataChangeTime, tz);
}
QDateTime lastModified(const QTimeZone &tz = QTimeZone::LocalTime) const
{
return fileTime(QFile::FileModificationTime, tz);
}
QDateTime lastRead(const QTimeZone &tz = QTimeZone::LocalTime) const
{
return fileTime(QFile::FileAccessTime, tz);
}
QDateTime fileTime(QFile::FileTime time, const QTimeZone &tz = QTimeZone::LocalTime) const;
#endif
bool caching() const;
void setCaching(bool on);