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

"QString::contains: invalid QRegularExpression object" should debug you the invalid pattern associated

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.2
    • None

    Description

      Reopening, see comments:

      Namely, that QT_FATAL_WARNINGS=1 is not a perfect solution, because other warnings which were not important (the task associated was not impeded), but are annoying to fix (https://stackoverflow.com/questions/46616685/qt-network-ssl-qsslsocket-cannot-resolve-sslv2-client-method – No solution!) are now halting my program before I can actually run the code which is actually impeding my progress, namely the invalid regular expression.

      QT_FATAL_WARNINGS=5 will stop on the fifth error. Thanks for correcting me.  


      Original Message:


      This debug message:

      QString::contains: invalid QRegularExpression object

      Should offer the additional information as to what pattern is actually failing the validity check. 

      The reason why this is useful in my case, is that I use thousands of regular expressions, and I do not use validity (re.isValid()) checks if I know my patterns will be constant (as in, program in once, no further variability). Thus when I have to debug, I have to more or less start putting in random breakpoints to track down the concerning pattern. 

      Knowing what pattern is actually failing would save me a ton of time. 

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            akiva Akiva Avraham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes