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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 4.5.0-beta1
    • Debugger
    • None
    • 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
    • Linux/X11

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes