forked from qt-creator/qt-creator
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:
@@ -61,6 +61,7 @@ inline StringView make_stringview(const QString &s)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||||
// QStringView::mid in Qt5 does not do bounds checking, in Qt6 it does
|
// QStringView::mid in Qt5 does not do bounds checking, in Qt6 it does
|
||||||
inline QStringView midView(const QString &s, int offset, int length)
|
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);
|
return QStringView(s).mid(offset, length);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
Reference in New Issue
Block a user