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

qmllint: produce warnings for string to valuetype conversions

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • 6.9
    • 6.6.0
    • QML: Tooling
    • None
    • 5f84cf00e (dev), aca69f832 (dev), 9cdd485c2 (dev), cdb254058 (dev)

    Description

      It seems that qmllint does not warn about string to value type conversion in QML.

      An example might be the `vector2d` types:

      import QtQuick
      
      Item {
          property vector2d myVector: "1.2,1.3"
      }
       

      Here a list of candidates that can be constructed from strings that qmllint should know about

      • point, like "30x50"
      • rect, like "30, 50, 100x150"
      • size, like "30x50"
      • color, like "blue" (that already has its own bugreport in QTBUG-100137)
      • quaternion, like "1,2,3,4" ("scalar,x,y,z")
      • vectorXd, like "1,2" or "1,2,3" or "1,2,3,4"

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes