sdktool: Fix build against old old Qt

Change-Id: Ifb2a368b40eceafc7839fa1abce67775e0eb233e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-09-18 09:25:34 +02:00
parent 4bcc371dfb
commit 7363ec8b66

View File

@@ -61,6 +61,7 @@ inline StringView make_stringview(const QString &s)
#endif
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
// QStringView::mid in Qt5 does not do bounds checking, in Qt6 it does
inline QStringView midView(const QString &s, int offset, int length)
{
@@ -74,5 +75,6 @@ inline QStringView midView(const QString &s, int offset, int length)
return QStringView(s).mid(offset, length);
#endif
}
#endif
} // namespace Utils