Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21133

Conditional breakpoint on the value of QString always evaluates to true.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: Qt Creator 4.5.0-beta1
    • Fix Version/s: None
    • Component/s: Debugger
    • Labels:
      None
    • Environment:
      Debian 9.5 Cinnamon x32 i386
      Qt 5.9.2 built from Git
      Qt Creator 4.5.0-beta1 (4.4.82) built from Git
    • Platform/s:
      Linux/X11

      Description

      Related Forum Thread

      When using breakpoints with a condition, expressions evaluating the equality of QString values seem to evaluate to true regardless of the actual value, resulting in the debugger breaking every time.

      This can be reliably reproduced on my setup using:

      QChar c = 'a';
      QString test;
      
      for(; c <= 'z'; ++c)
      {
          test = QString(c);
          qDebug() << test; /*--Breakpoint here--*/
      }

      with the following breakpoint condition:

      test == "d"
      

      In theory, the debugger should only break once, in the fourth loop iteration, however in reality it seems to break on every iteration.

        Attachments

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

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            lscott Lewis Scott
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes