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

Auto-indentation is broken for QML_* C++ macros

    XMLWordPrintable

Details

    • macOS, Windows
    • 7c1f2ea16 (10.0)

    Description

      • ClangFormat settings:
        • Formatting mode: "Indenting only"
        • Override Clang Format configuration file: False
      • Current settings: "Qt [built-in]"

       

      See attached project. Auto-indentation produces the following, but not if the QML_* macros are removed:

      #ifndef MYSINGLETON_H
      #define MYSINGLETON_H
      
      #include <QQmlEngine>
      
      class MySingleton : public QObject
      {
          Q_OBJECT
          QML_ELEMENT
              QML_SINGLETON
              
              public:
                       explicit MySingleton(QObject *parent = nullptr) : QObject(parent) {}
      };
      
      #endif // MYSINGLETON_H
      
      

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-29086
        # Subject Branch Project Status CR V

        Activity

          People

            artem.sokolovskii Artem Sokolovskii
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes