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

Quick fix inverts condition

    XMLWordPrintable

Details

    • fc5b890290f393f6eb7ea124f9f2e3746274a41b (qt-creator/qt-creator/master)

    Description

      1. Run Creator with enabled Clang Code Model.
      2. Have a simple conditional in your code:
        if (1 && 0)
            return;
        

        The condition is obviously always false.

      3. Move the cursor into the condition and ask for quick fixes using Alt+Enter.
      4. Select the quick fix "Apply Fix: Remove constant to silence this warning" and press Enter.
        The code will be changed to:
            if (1)
                return;
        

        Now the condition is always true.

      The resulting code should do the same as before the quick fix.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes