Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
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.
- Make qmllint upgrade "Unused import" to a Warning?
- Give Qt Creator a more advanced algorithm for detecting qmllint issues, compared to https://codereview.qt-project.org/c/qt-creator/qt-creator/+/483236 ?
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
- relates to
-
QTCREATORBUG-29325 Process qmlsc/qmllint output when using a non-Ninja generator
-
- Open
-
-
QTCREATORBUG-28720 qmlsc AND qmllint output don't appear in the "Issues" pane for most kits
-
- Closed
-
-
QTBUG-115856 Don't let qmllint warnings fail the build
-
- Closed
-