Implement missing QSupportedWritingSystems comparison operators
The operators were exported, but not implemented. Change-Id: I6c89c1f4b76040d2388b3a10afc6eeeb52638e1b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
13e4cf6eac
commit
a1437ce162
@ -164,6 +164,26 @@ QSupportedWritingSystems &QSupportedWritingSystems::operator=(const QSupportedWr
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==(const QSupportedWritingSystems &lhs, const QSupportedWritingSystems &rhs)
|
||||||
|
{
|
||||||
|
return !(lhs != rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!=(const QSupportedWritingSystems &lhs, const QSupportedWritingSystems &rhs)
|
||||||
|
{
|
||||||
|
if (lhs.d == rhs.d)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Q_ASSERT(lhs.d->list.size() == rhs.d->list.size());
|
||||||
|
Q_ASSERT(lhs.d->list.size() == QFontDatabase::WritingSystemsCount);
|
||||||
|
for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
|
||||||
|
if (lhs.d->list.at(i) != rhs.d->list.at(i))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
QDebug operator<<(QDebug debug, const QSupportedWritingSystems &sws)
|
QDebug operator<<(QDebug debug, const QSupportedWritingSystems &sws)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user