Fix build issues.

This commit is contained in:
Roman Telezhynskyi 2023-06-28 10:19:17 +03:00
parent fbfb63feaa
commit c132d5676d
3 changed files with 12 additions and 2 deletions

View File

@ -79,7 +79,7 @@ Q_REQUIRED_RESULT auto ParseCorrectiosn(const QJsonObject &correctionsObject) ->
if (!segments.isEmpty())
{
corrections->insert(glyph.front(), segments);
corrections->insert(Front(glyph), segments);
}
}

View File

@ -419,4 +419,14 @@ inline auto Back(const QString &str) -> QChar
#endif
}
//---------------------------------------------------------------------------------------------------------------------
inline auto Front(const QString &str) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
return str.front();
#else
return str.at(0);
#endif
}
#endif // COMPATIBILITY_H

View File

@ -338,7 +338,7 @@ auto VSvgFontEngine::InFont(QChar ch) const -> bool
//---------------------------------------------------------------------------------------------------------------------
auto VSvgFontEngine::CanRender(const QString &str) const -> bool
{
return std::all_of(str.cbegin(), str.cend(), [this](auto c) { return InFont(c); });
return std::all_of(str.cbegin(), str.cend(), [this](auto c) { return this->InFont(c); });
}
//---------------------------------------------------------------------------------------------------------------------