QChar: purge deprecated API
Since 5.3 joining() and old Joining type Replaced by JoiningType joiningType() Change-Id: Iefee50aaf94cec6d67b5fc004b3e68357b2015c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
21d9384800
commit
996a7fc6f1
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
@ -538,24 +538,6 @@ QT_BEGIN_NAMESPACE
|
||||
\sa joiningType()
|
||||
*/
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
/*!
|
||||
\enum QChar::Joining
|
||||
\deprecated in 5.3, use JoiningType instead.
|
||||
|
||||
This enum type defines the Unicode joining attributes. See the
|
||||
\l{http://www.unicode.org/}{Unicode Standard} for a description
|
||||
of the values.
|
||||
|
||||
\value Center
|
||||
\value Dual
|
||||
\value OtherJoining
|
||||
\value Right
|
||||
|
||||
\sa joining()
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\enum QChar::CombiningClass
|
||||
|
||||
@ -1270,38 +1252,6 @@ QChar::JoiningType QChar::joiningType(char32_t ucs4) noexcept
|
||||
return QChar::JoiningType(qGetProp(ucs4)->joining);
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
/*!
|
||||
\fn QChar::Joining QChar::joining() const
|
||||
\deprecated in 5.3, use joiningType() instead.
|
||||
|
||||
Returns information about the joining properties of the character
|
||||
(needed for certain languages such as Arabic).
|
||||
*/
|
||||
|
||||
/*!
|
||||
\overload
|
||||
\deprecated in 5.3, use joiningType() instead.
|
||||
|
||||
Returns information about the joining properties of the UCS-4-encoded
|
||||
character specified by \a ucs4 (needed for certain languages such as Arabic).
|
||||
|
||||
\note Before Qt 6, this function took a \c uint argument.
|
||||
*/
|
||||
QChar::Joining QChar::joining(char32_t ucs4) noexcept
|
||||
{
|
||||
if (ucs4 > LastValidCodePoint)
|
||||
return QChar::OtherJoining;
|
||||
switch (qGetProp(ucs4)->joining) {
|
||||
case QChar::Joining_Causing: return QChar::Center;
|
||||
case QChar::Joining_Dual: return QChar::Dual;
|
||||
case QChar::Joining_Right: return QChar::Right;
|
||||
default: break;
|
||||
}
|
||||
return QChar::OtherJoining;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\fn bool QChar::hasMirrored() const
|
||||
|
||||
|
@ -394,13 +394,6 @@ public:
|
||||
Joining_Transparent
|
||||
};
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
enum Joining
|
||||
{
|
||||
OtherJoining, Dual, Right, Center
|
||||
};
|
||||
#endif
|
||||
|
||||
enum CombiningClass
|
||||
{
|
||||
Combining_BelowLeftAttached = 200,
|
||||
@ -456,20 +449,6 @@ public:
|
||||
inline Category category() const noexcept { return QChar::category(ucs); }
|
||||
inline Direction direction() const noexcept { return QChar::direction(ucs); }
|
||||
inline JoiningType joiningType() const noexcept { return QChar::joiningType(ucs); }
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
QT_DEPRECATED inline Joining joining() const noexcept
|
||||
{
|
||||
switch (QChar::joiningType(ucs)) {
|
||||
case QChar::Joining_Causing: return QChar::Center;
|
||||
case QChar::Joining_Dual: return QChar::Dual;
|
||||
case QChar::Joining_Right: return QChar::Right;
|
||||
case QChar::Joining_None:
|
||||
case QChar::Joining_Left:
|
||||
case QChar::Joining_Transparent:
|
||||
default: return QChar::OtherJoining;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
inline unsigned char combiningClass() const noexcept { return QChar::combiningClass(ucs); }
|
||||
|
||||
inline QChar mirroredChar() const noexcept { return QChar(QChar::mirroredChar(ucs)); }
|
||||
@ -488,17 +467,10 @@ public:
|
||||
|
||||
inline UnicodeVersion unicodeVersion() const noexcept { return QChar::unicodeVersion(ucs); }
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED Q_DECL_CONSTEXPR inline char toAscii() const noexcept { return toLatin1(); }
|
||||
#endif
|
||||
Q_DECL_CONSTEXPR inline char toLatin1() const noexcept { return ucs > 0xff ? '\0' : char(ucs); }
|
||||
Q_DECL_CONSTEXPR inline char16_t unicode() const noexcept { return ucs; }
|
||||
Q_DECL_RELAXED_CONSTEXPR inline char16_t &unicode() noexcept { return ucs; }
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED static Q_DECL_CONSTEXPR inline QChar fromAscii(char c) noexcept
|
||||
{ return fromLatin1(c); }
|
||||
#endif
|
||||
static Q_DECL_CONSTEXPR QChar fromLatin1(char c) noexcept { return QLatin1Char(c); }
|
||||
|
||||
Q_DECL_CONSTEXPR inline bool isNull() const noexcept { return ucs == 0; }
|
||||
@ -566,9 +538,6 @@ public:
|
||||
static Category QT_FASTCALL category(char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION;
|
||||
static Direction QT_FASTCALL direction(char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION;
|
||||
static JoiningType QT_FASTCALL joiningType(char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION;
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
QT_DEPRECATED static Joining QT_FASTCALL joining(char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION;
|
||||
#endif
|
||||
static unsigned char QT_FASTCALL combiningClass(char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION;
|
||||
|
||||
static char32_t QT_FASTCALL mirroredChar(char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the test suite of the Qt Toolkit.
|
||||
@ -76,9 +76,6 @@ private slots:
|
||||
void unicodeVersion();
|
||||
};
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
|
||||
void tst_QChar::fromChar16_t()
|
||||
{
|
||||
#if defined(Q_COMPILER_UNICODE_STRINGS)
|
||||
|
Loading…
Reference in New Issue
Block a user