QUrl: Use Q_CORE_REMOVED_SINCE instead of explicit version checks

Use Q_CORE_REMOVED_SINCE macro for fromAce()/toAce() API changes.

Pick-to: 6.3
Change-Id: I057c6d648c2141929f04e4b4c4a38ba3275261ab
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Ievgenii Meshcheriakov 2022-02-02 15:18:06 +01:00
parent 6afa04f16c
commit 58c48b40d1
3 changed files with 15 additions and 28 deletions

View File

@ -153,6 +153,18 @@ int QOperatingSystemVersion::compare(const QOperatingSystemVersion &v1,
return QOperatingSystemVersionBase::compare(v1, v2);
}
#include "qurl.h"
QString QUrl::fromAce(const QByteArray &domain)
{
return fromAce(domain, {});
}
QByteArray QUrl::toAce(const QString &domain)
{
return toAce(domain, {});
}
#endif // QT_CORE_REMOVED_SINCE(6, 3)
#if QT_CORE_REMOVED_SINCE(6, 4)

View File

@ -3061,17 +3061,6 @@ QString QUrl::fromAce(const QByteArray &domain, QUrl::AceProcessingOptions optio
ForbidLeadingDot /*FIXME: make configurable*/, options);
}
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
/*!
\since 4.2
\overload
*/
QString QUrl::fromAce(const QByteArray &domain)
{
return fromAce(domain, {});
}
#endif
/*!
\since 6.3
@ -3095,17 +3084,6 @@ QByteArray QUrl::toAce(const QString &domain, AceProcessingOptions options)
.toLatin1();
}
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
/*!
\since 4.2
\overload
*/
QByteArray QUrl::toAce(const QString &domain)
{
return toAce(domain, {});
}
#endif
/*!
\internal

View File

@ -287,15 +287,12 @@ public:
};
Q_DECLARE_FLAGS(AceProcessingOptions, AceProcessingOption)
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
static QString fromAce(const QByteArray &, AceProcessingOptions options = {});
static QByteArray toAce(const QString &, AceProcessingOptions options = {});
#else
#if QT_CORE_REMOVED_SINCE(6, 3)
static QString fromAce(const QByteArray &);
static QByteArray toAce(const QString &);
static QString fromAce(const QByteArray &, AceProcessingOptions options);
static QByteArray toAce(const QString &, AceProcessingOptions options);
#endif
static QString fromAce(const QByteArray &domain, AceProcessingOptions options = {});
static QByteArray toAce(const QString &domain, AceProcessingOptions options = {});
static QStringList idnWhitelist();
static QStringList toStringList(const QList<QUrl> &uris, FormattingOptions options = FormattingOptions(PrettyDecoded));