diff options
Diffstat (limited to 'src/corelib/compat/removed_api.cpp')
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 163 |
1 files changed, 150 insertions, 13 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index 4bca576ed4..b8f208e82e 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -4,7 +4,6 @@ #define QT_CORE_BUILD_REMOVED_API #include "qglobal.h" -#include "qnumeric.h" QT_USE_NAMESPACE @@ -211,7 +210,7 @@ void QObject::setObjectName(const QString &name) void QSettings::beginGroup(const QString &prefix) { - return beginGroup(qToAnyStringViewIgnoringNull(prefix)); + beginGroup(qToAnyStringViewIgnoringNull(prefix)); } int QSettings::beginReadArray(const QString &prefix) @@ -636,7 +635,7 @@ QBitArray QBitArray::operator~() const return QBitArray(*this).inverted_inplace(); } -#include "qbytearray.h" // also includes inlined API +#include "qbytearray.h" QByteArray QByteArray::left(qsizetype len) const { @@ -929,9 +928,41 @@ QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode) #endif // QT_CORE_REMOVED_SINCE(6, 7) #if QT_CORE_REMOVED_SINCE(6, 8) +#include "qabstractitemmodel.h" + +bool QPersistentModelIndex::operator<(const QPersistentModelIndex &other) const noexcept +{ + return is_lt(compareThreeWay(*this, other)); +} + +bool QPersistentModelIndex::operator==(const QPersistentModelIndex &other) const noexcept +{ + return comparesEqual(*this, other); +} + +bool QPersistentModelIndex::operator==(const QModelIndex &other) const noexcept +{ + return comparesEqual(*this, other); +} + +bool QPersistentModelIndex::operator!=(const QModelIndex &other) const noexcept +{ + return !comparesEqual(*this, other); +} + +#include "qbitarray.h" // inlined API #include "qbytearray.h" // inlined API +QT_BEGIN_NAMESPACE +namespace QtPrivate { +Q_CORE_EXPORT qsizetype lastIndexOf(QByteArrayView haystack, qsizetype from, char needle) noexcept +{ + return lastIndexOf(haystack, from, uchar(needle)); +} +} +QT_END_NAMESPACE + #include "qcborarray.h" // inlined API #include "qcbormap.h" // inlined API @@ -952,6 +983,15 @@ bool QDir::operator==(const QDir &dir) const return comparesEqual(*this, dir); } +#if QT_CONFIG(easingcurve) +#include "qeasingcurve.h" + +bool QEasingCurve::operator==(const QEasingCurve &other) const +{ + return comparesEqual(*this, other); +} +#endif // QT_CONFIG(easingcurve) + #include "qfileinfo.h" // inlined API bool QFileInfo::operator==(const QFileInfo &fileinfo) const @@ -959,7 +999,9 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const return comparesEqual(*this, fileinfo); } +#if QT_CONFIG(itemmodel) #include "qitemselectionmodel.h" // inlined API +#endif // itemmodel #include "qjsonarray.h" @@ -1005,6 +1047,33 @@ bool QJsonValue::operator!=(const QJsonValue &other) const return !comparesEqual(*this, other); } +#include "qline.h" // inlined API + +#if QT_CONFIG(mimetype) +#include "qmimetype.h" + +bool QMimeType::operator==(const QMimeType &other) const +{ + return comparesEqual(*this, other); +} +#endif // QT_CONFIG(mimetype) + +#include "qobject.h" +#include "qnumeric.h" + +int QObject::startTimer(std::chrono::milliseconds time, Qt::TimerType timerType) +{ + using namespace std::chrono; + using ratio = std::ratio_divide<std::milli, std::nano>; + nanoseconds::rep r; + if (qMulOverflow<ratio::num>(time.count(), &r)) { + qWarning("QObject::startTimer(std::chrono::milliseconds): " + "'time' arg overflowed when converted to nanoseconds."); + r = nanoseconds::max().count(); + } + return startTimer(nanoseconds{r}, timerType); +} + #if QT_CONFIG(processenvironment) #include "qprocess.h" // inlined API @@ -1014,6 +1083,65 @@ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const } #endif // QT_CONFIG(processenvironment) +#if QT_CONFIG(regularexpression) +#include "qregularexpression.h" + +bool QRegularExpressionMatch::hasCaptured(QStringView name) const +{ + return hasCaptured(QAnyStringView(name)); +} + +QString QRegularExpressionMatch::captured(QStringView name) const +{ + return captured(QAnyStringView(name)); +} + +QStringView QRegularExpressionMatch::capturedView(QStringView name) const +{ + return capturedView(QAnyStringView(name)); +} + +qsizetype QRegularExpressionMatch::capturedStart(QStringView name) const +{ + return capturedStart(QAnyStringView(name)); +} + +qsizetype QRegularExpressionMatch::capturedLength(QStringView name) const +{ + return capturedLength(QAnyStringView(name)); +} + +qsizetype QRegularExpressionMatch::capturedEnd(QStringView name) const +{ + return capturedEnd(QAnyStringView(name)); +} + +bool QRegularExpression::operator==(const QRegularExpression &other) const +{ + return comparesEqual(*this, other); +} +#endif // QT_CONFIG(regularexpression) + +#if QT_CONFIG(future) +#include "qresultstore.h" + +bool QtPrivate::ResultIteratorBase::operator==(const QtPrivate::ResultIteratorBase &other) const +{ + return comparesEqual(*this, other); +} + +bool QtPrivate::ResultIteratorBase::operator!=(const QtPrivate::ResultIteratorBase &other) const +{ + return !comparesEqual(*this, other); +} +#endif // QT_CONFIG(future) + +#include "qstring.h" // inlined API + +#if QT_CONFIG(thread) +# include "qthreadpool.h" // inlined API +#endif + #include "qurl.h" bool QUrl::operator<(const QUrl &url) const @@ -1038,22 +1166,31 @@ bool QUrlQuery::operator==(const QUrlQuery &other) const return comparesEqual(*this, other); } -#include "qobject.h" +#include "quuid.h" -int QObject::startTimer(std::chrono::milliseconds time, Qt::TimerType timerType) +bool QUuid::operator<(const QUuid &other) const noexcept { - using namespace std::chrono; - using ratio = std::ratio_divide<std::milli, std::nano>; - if (nanoseconds::rep r; qMulOverflow<ratio::num>(time.count(), &r)) { - qWarning("QObject::startTimer(std::chrono::milliseconds time ...): " - "'time' arg will overflow when converted to nanoseconds."); - } - return startTimer(nanoseconds{time}, timerType); + return is_lt(compareThreeWay(*this, other)); } -#include "qstring.h" // inlined API +bool QUuid::operator>(const QUuid &other) const noexcept +{ + return is_gt(compareThreeWay(*this, other)); +} + +QUuid QUuid::createUuidV3(const QUuid &ns, const QByteArray &baseData) noexcept +{ + return createUuidV3(ns, qToByteArrayViewIgnoringNull(baseData)); +} + +QUuid QUuid::createUuidV5(const QUuid &ns, const QByteArray &baseData) noexcept +{ + return createUuidV5(ns, qToByteArrayViewIgnoringNull(baseData)); +} +#if QT_CONFIG(xmlstream) #include "qxmlstream.h" // inlined API +#endif // QT_CONFIG(xmlstream) // #include "qotherheader.h" // // implement removed functions from qotherheader.h |