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

qmllint: implement .ui.qml warnings from qmljsstaticanalysismessage.cpp

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • 6.9
    • 6.8
    • QML: Tooling
    • None
    • 5fc2bfd36 (dev), 31fbe8a19 (dev), 8b61addfa (dev), 603a75608 (dev), 0b94b4ff1 (dev)

    Description

      Implement warnings in qmlls from QtC's codemodel for .ui.qml files

      done to be done in progress won't do waiting for QDS team input
       

      • WarnImperativeCodeNotEditableInVisualDesigner
        (warns about assignments to properties whose name is in VisualAspectsPropertyBlackList(), like `x =/ 2` for example)
      • WarnUnsupportedTypeInVisualDesigner (list of unsupported types to be adapted by QDS team)
        (Warn about types that are not supported in general)
      • WarnReferenceToParentItemNotSupportedByVisualDesigner
      • WarnUndefinedValueForVisualDesigner (does not seem to be really needed, as qmllint already complains about context properties)
        (Warn about values that the code model can't recognize, usually context properties, as QDS does not work properly with them)
      • WarnStatesOnlyInRootItemForVisualDesigner (not needed anymore because that is nowadays supported by QDS)
      • ErrUnsupportedRootTypeInVisualDesigner (list of unsupported types to be adapted by QDS team, but a first implementation can be already done I think)
        (Warn about types that are not supported as .qml.ui root type)
      • ErrInvalidIdeInVisualDesigner
        (some ids should be at least frowned upon, see IdsThatShouldNotBeUsedInDesigner())
      • ErrUnsupportedRootTypeInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnUnsupportedRootTypeInVisualDesigner)
      • ErrUnsupportedTypeInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnUnsupportedTypeInVisualDesigner)
      • ErrFunctionsNotSupportedInQmlUi
      • ErrBlocksNotSupportedInQmlUi
        (Complain about "{}"-JS-blocks and "function"-keyword when outside of a `Connections`)
      • ErrBehavioursNotSupportedInQmlUi (behaviours are nowadays allowed in QDS and should not be warned about)
      • ErrStatesOnlyInRootItemInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnStatesOnlyInRootItemForVisualDesigner)
      • ErrReferenceToParentItemNotSupportedInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnReferenceToParentItemNotSupportedByVisualDesigner)
      • WarnDoNotMixTranslationFunctionsInQmlUi (note: implemented in qmllint instead of in the plugin)

      Also, you can find all qtc codemodel warnings in qmljsstaticanalysismessage.cpp's StaticAnalysisMessages::StaticAnalysisMessages() and qmljsstaticanalysismessage.h definition of Type enum (each enum value corresponds to a warning, see also their description in the StaticAnalysisMessages::StaticAnalysisMessages() constructor!)
      There is also some documentation about the restrictions on https://doc.qt.io/qtcreator/creator-quick-ui-forms.html

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-129308
          # Subject Branch Project Status CR V

          Activity

            People

              sami.shalayel Sami Shalayel
              sami.shalayel Sami Shalayel
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: