Unfortunately, this is not possible in the current state of Uncrustify. Therefore, the best thing you can do is configure the options you mentioned as follows:
nl_func_decl_start = ignore nl_func_def_start = ignore nl_func_decl_start_single = ignore nl_func_def_start_single = ignore ls_func_split_full = true
and manually pack the first parameter as appropriate. However, I personally do not think this is a good idea. Just let it automatically do lazy / on demand. For example, I like the same settings that I listed above and still have very neat code in every possible case. The following are examples.
There are no wrapping parameters - constructor and list of constructor initializers that fit into the maximum string length:
PluginDialog:: PluginDialog(QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
Now they do not fit, and by agreement, we first decided to move the list of initializers:
PluginDialog:: PluginDialog(QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
another agreement is possible:
PluginDialog:: PluginDialog(QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
Now, any case from the previous two does not fit, and therefore any of them merges into the following and only possible configuration:
PluginDialog:: PluginDialog(QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
Now we are no longer suitable, and by agreement, we decided to move the column of the list of constructor initializers to the column of the list of constructor parameters:
PluginDialog:: PluginDialog(QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
By the way, we again have a branching case, i.e. it is also possible:
PluginDialog:: PluginDialog( QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
Finally, any of the two previous cases does not fit, and therefore any of them merges into the final and only possible configuration:
PluginDialog:: PluginDialog( QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
It would be great if Uncrustify suggested the option to "avoid confusing indentation", for example, Jindent. In this case, the last fragment, for example, looks like this:
PluginDialog:: PluginDialog( QString const& path, QStringList const& fileNames, QWidget* parent): QDialog(parent), label(new QLabel), treeWidget(new QTreeWidget), okButton(new QPushButton(tr("OK"))) {
which is more readable and enjoyable. I suggested this feature for Uncrustify. Nevertheless, I doubt that we will see that this is realized in the near future, because the author of this project seems to be too busy with some other material or not interested in actively developing this project.