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

Improve the set of qmlsc/qmllint messages that get shown in the Issues pane

    XMLWordPrintable

Details

    Description

      Current limitations

      While qmlsc/qmllint errors and warnings are shown in Qt Creator's Issue Pane, messages that are marked as "Info" (i.e. those that are considered less serious than "Warnings") are not shown there.

       

      Example
      Given this code:

      import QtQuick
      import QtQuick.Controls.Basic
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Item {
              property string foo
              Item {
                  property string bar: foo
              }
          }
      }
      
      

       

      The qmllint output is:

      Info: D:/Dev/Test/Main.qml:2:1: Unused import [unused-imports]
      import QtQuick.Controls.Basic
      ^^^^^^
      Warning: D:/Dev/Test/Main.qml:12:25: Unqualified access [unqualified]
                  property string bar: foo
                                       ^^^
      Info: foo is a member of a parent element.
            You can qualify the access with its id to avoid this warning:
      
                  property string bar: <id>.foo
                                       ^^^^^
      

       

      However, only "Unqualified access" appears in the Issues pane. "Unused import" does not, even though users probably consider this an issue that they want qmllint to inform them about.

       

      Suggestions and thoughts

      We want to get "Unused import" onto the Issues pane somehow. I'm not sure how.

       

      I'm also not sure if the suggestions for fixing the issue (e.g. "You can qualify the access with its id...") should appear in the Issues pane or not. Please debate away in the comments section.

      Attachments

        Issue Links

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

          Activity

            People

              semih.yavuz Semih Yavuz
              skoh-qt Sze Howe Koh
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes