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

Example Project "Custom Sort/Filter Model Example" has broken QRegExp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.12.0 Alpha
    • Component/s: Examples and Demos
    • Labels:
      None
    • Commits:
      b3bbba7b871144c5d6f4b1a432f5c2cce02e321f

      Description

      The regular expression "emailPattern" has no opening parenthesis for the capture group:
      {{ static QRegExp emailPattern("\\w\\.@[\\w
      .|file://w//]
      "); }}
      should be
      {{ static QRegExp emailPattern("(\\w\\.@[\\w
      .|file://w//])
      "); }}
       

      Alternatively, the capture group could be omitted but then the subsequent extractions of the email text must match the whole regexp: cap(0) instead of cap(1). The later solution is probably better because it is simpler.

       

      Regards,

      Stuart

        Attachments

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

          Activity

            People

            • Assignee:
              chehrlic Christian Ehrlicher
              Reporter:
              stuartredmann Stefan Ensslen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes