Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2, 5.15.4
-
d2833a3ce5af725d66ef9338f2a61b766dd3cb2d 0e2776320cc39a95b914787d28a09c615f68b708 (qt/tqtc-qtbase/5.15)
Description
As mentioned in QStringView::mid(qsizetype start, qsizetype length) documentation that Since 5.15.2, the behavior is compatible with QString::mid() for length<0, But following code gives a assert hit in 5.15.2 - 5.15.4:
QString t = "my test"; QStringView v = t; auto v2 = v.mid(2,-1); // asserts on this line, in the QStringView constructor qInfo() << v2;
ASSERT: "len >= 0" in file C:\Qt\5.15.4\msvc2019_64\include\QtCore/qstringview.h, line 175
Attachments
Issue Links
- relates to
-
QTBUG-86516 QStringView-related API missing in Qt5
- Closed