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

Setting CaseSensitivity in QSortFilterProxymodel for QRegularExpression doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • 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)

    Description

      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.

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-83313
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes