Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-83313

Setting CaseSensitivity in QSortFilterProxymodel for QRegularExpression doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.15.2
    • 5.12.0, 5.15.0 Beta2
    • Core: Item Models
    • None
    • 9a921d78e87452962043721669f3027f7566eef4 (qt/qtbase/dev) aae2512c85ff014eeca3c2ae82826dba31f4c259 (qt/qtbase/5.15)

      When calling QSortFilterProxyModel::setCaseSensitivity the condition for QRegularExpression is inverted:

      options.setFlag(QRegularExpression::CaseInsensitiveOption, cs == Qt::CaseSensitive);

       

      Also calling QSortFilterProxyModel::setFilterRegularExpression(const QString &pattern) ignores QSortFilterProxyModel::caseSensitivity, while QSortFilterProxyModel::setFilterRegExp does take it into account.

      The documentation for both says

      Setting this property overwrites the current filterCaseSensitivity.

      But I guess it mainly refers to the overloads taking a QRegExp/QRegularExpression since they already have a CaseSensitivity state, while a string doesn't.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dfaure_kdab David Faure
            mkrems Marcel Krems
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes