0

I have as a C++ class constuctor

Status::Status(QObject *parent) : QObject(parent)
    , m_currentPage(Status::UndefinedPage)
    , m_lastPage(Status::UndefinedPage) ,
    m_currentSubPage(Status::UndefinedSubPage), m_lastSubPage(Status::UndefinedSubPage)
    , m_ptr(0)
{
}

and would like to see it like this

Status::Status(QObject *parent) 
    : QObject(parent)
    , m_currentPage(Status::UndefinedPage)
    , m_lastPage(Status::UndefinedPage)
    , m_currentSubPage(Status::UndefinedSubPage)
    , m_lastSubPage(Status::UndefinedSubPage)
    , m_ptr(0)
{
}

I have found the relevant options:

nl_class_colon                           = remove
nl_class_init_args                       = remove
pos_comma                                = lead_force
pos_class_comma                          = lead_force
pos_class_colon                          = lead_force

but this also affects normal function parameters which I do not want. As soon as I alter pos_comma all my member initialization list gets crowded.

How is it possible to define the look of constructor initialization list different from function parameter lists?

Thanks.

EDIT: I want the function parameter list to look like

int r = myFuntion("a", "b",
                  "c");
Lorenz
  • 503
  • 2
  • 9

1 Answers1

0

No, as of Uncrustify 0.60 this is impossible. You have to either stick with different style or look for another formatter. You could also submit a feature request.

Alexander Shukaev
  • 16,674
  • 8
  • 70
  • 85