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

Another invalid case of M325

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 8.0.1
    • Quick / QML Support
    • None
    • macOS 12.1, Apple Silicon, Qt 6.2.3, Apple clang version 13.0.0 (clang-1300.0.29.30)
    • macOS

    Description

      The following has no problem:

      Window {
          Component.onCompleted: {
              let real1 = 5.7
              if (real1 === 3.4) {} // OK
      
              let real2 = width
              if (real2 === 3.4) {} // OK
          }
      }
      

       

      However replace Window with Rectangle and it does have a problem:

      Rectangle {
          Component.onCompleted: {
              let real1 = 5.7
              if (real1 === 3.4) {} // OK
      
              let real2 = width
              if (real2 === 3.4) {} // Warning M325
          }
      }
      

      Attachments

        1. M325 Rectangle.png
          M325 Rectangle.png
          25 kB
        2. M325 Window.png
          M325 Window.png
          19 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes