Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.4, 6.1.0, 6.2.0
-
None
-
6cee204d56205e250b0675c9c6d4dd8a2367f3c4 (qt/qtbase/dev) 75d699e1cd1cd44f5519ee5bc36e5821b0c9c14c (qt/qtbase/6.2) f90c1a2b54b72a9455cf952ceb0250ffc7e0d648 (qt/qtbase/6.1.3) 8320a92141b736683bb3372f754375cb52836f5d (qt/qtbase/6.1.3)
Description
#include <QDebug> #include <QRegularExpression> #include <QString> int main(int argc, char *argv[]) { const QRegularExpression expr("\\s+"); const QString str("Foo Bar Blubb"); qDebug() << str.lastIndexOf(expr, -7); }
prints 7 instead of the correct 3.
I'd suspect https://codereview.qt-project.org/c/qt/qtbase/+/325907 (though I haven't tried to confirm that).
Attachments
Issue Links
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-94215 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
352730,2 | Mode bar: Fix splitting configuration name into two lines | 4.15 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
353981,14 | QS(V)/QBA(V)/QL1S::lastIndexOf: fix the offset calculations | dev | qt/qtbase | Status: MERGED | -1 | 0 |
365121,2 | Revert "QString::lastIndexOf: fix off-by-one for zero length matches" | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
365179,6 | Revert "QString::lastIndexOf: fix off-by-one for zero length matches" | 6.1.3 | qt/qtbase | Status: MERGED | +2 | 0 |
365834,3 | QS(V)/QBA(V)/QL1S::lastIndexOf: fix the offset calculations | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
366387,3 | Adjust tst_qstringapisymmetry test data | 6.1.3 | qt/qtbase | Status: MERGED | +2 | 0 |
366766,1 | Revert "QString::lastIndexOf: fix off-by-one for zero length matches" | 6.1 | qt/qtbase | Status: ABANDONED | +2 | 0 |