Uncrustify 设置不同于函数参数列表的初始化列表格式 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) { }
我想看到它是这样的Uncrustify 设置不同于函数参数列表的初始化列表格式 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) { },uncrustify,Uncrustify,我想看到它是这样的 Status::Status(QObject *parent) : QObject(parent) , m_currentPage(Status::UndefinedPage) , m_lastPage(Status::UndefinedPage) , m_currentSubPage(Status::UndefinedSubPage) , m_lastSubPage(Status::UndefinedSubPage) , m
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)
{
}
我找到了相关的选择:
nl_class_colon = remove
nl_class_init_args = remove
pos_comma = lead_force
pos_class_comma = lead_force
pos_class_colon = lead_force
但这也会影响正常的函数参数,这是我不想要的。只要我改变pos_逗号,我所有的成员初始化列表就会变得拥挤
如何定义不同于函数参数列表的构造函数初始化列表的外观
谢谢
编辑:我希望函数参数列表如下所示
int r = myFuntion("a", "b",
"c");
不,从0.60开始,这是不可能的。您必须要么坚持使用不同的样式,要么寻找另一个格式化程序。您还可以提交功能请求