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

Setting CaseSensitivity in QSortFilterProxymodel for QRegularExpression doesn't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.0, 5.15.0 Beta2
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None
    • Commits:
      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes