Hi Mike

The bug report has been added: https://bugreports.qt.io/browse/QTBUG-137944

Thank you
Matthew

On 2025/06/23 01:58, Mike Trahearn wrote:
Hi Matthew,

Could you write this up in a JIRA ticket please https://bugreports.qt.io/ ?

There’s a number of qmlformat issues that need to be dealt with (and many have so that’s great) but its good to see them all in the same place.
Your examples should be included because they are really nice use cases.

Mike

*Director, Codecept Software Pty Ltd*
miketrahe...@codeceptsoftware.com
+61 (0) 467 084 485
ACN: 679 947 347
ABN: 55 679 947 347
Book a Consultation <https://calendar.app.google/2gEvFrCYj5gCodkc7>

On 23 Jun 2025, at 9:56 am, Mike Trahearn <miketrahe...@codeceptsoftware.com> wrote:

Hi Matthew,

Could you write this up in a JIRA ticket please https://bugreports.qt.io/ ?

There’s a number of qmlformat issues that need to be dealt with (and many have so that’s great) but its good to see them all in the same place.
Your examples should be included because they are really nice use cases.

Mike

D*irector, Codecept Software Pty Ltd*
miketrahe...@codeceptsoftware.com
+61 (0) 467 084 485
ACN: 679 947 347
ABN: 55 679 947 347
Book a Consultation <https://calendar.app.google/2gEvFrCYj5gCodkc7>

On 22 Jun 2025, at 9:10 pm, Matthew Fincham via Interest <interest@qt-project.org> wrote:

Hi Qt

I've been trying to adopt qmlformat, but have hit some problems I can't work around.

1. qmlformat moves comments for disabling qmllint to new lines, and in some cases it is impossible to get the disable on the correct line.  For example:

    EIUMAPQTE.ResourceMapHistoryControls { // qmllint disable required

becomes

    EIUMAPQTE.ResourceMapHistoryControls {
       // qmllint disable required

(because of MaxColumnWidth)

Ideally I would expect qmlformat to allow the maximum column width rule to be violated for linter disable comments. This is what clang-format does. Alternatively, and this would be nice, is to support a disable for the next line, similar to NOLINTNEXTLINE that clang-format supports.


2. qmlformat is removing some of the type annotations. For example:

    property var isSelected: function (dayOfMonth_, selectedDate_: Date) {
         return dayOfMonth_ == selectedDate_.getDate();
    }

becomes

    property var isSelected: function (dayOfMonth_, selectedDate_) {
         return dayOfMonth_ == selectedDate_.getDate();

    }

(the ': Date' annotation has been removed)

What is the best way to report this? Should it get a PR?

Many thanks
Matthew Fincham
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to