jesperhh / qmlfmt

qmlfmt - command line application that formats QML files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QML enum is removed

onnodb opened this issue · comments

qmlfmt is also affected by QTCREATORBUG-22196: when trying to save a document such as

import QtQuick 2.9

Item {
  enum MyEnum {
    Red,
    Green,
    Blue
  }
}

the resulting formatted document has the enum removed:

import QtQuick 2.9

Item {

}

This is to be expected since qmlfmt is using Qt Creator formatting under the hood.

Yes, sorry, I didn't mean to put this issue on your plate. Just thought it'd be useful to put a reference here to the Qt bug report, in case other users of qmlfmt encounter this problem.

As a sidenote, as big fans of clang-format, we've also been enjoying qmlfmt a lot in our project. Thanks for putting this together!

Great that you like it!

Once a fix is in Qt Creator I will try to get a new version out as soon as possible.

Looks like this is finally fixed in 4.10, will update the tool once it ships.

Really nice! Thanks!