Enforce Style with script/style.sh
added pre-commit.style for use a git hook
General
- Spaces After Commas
Includes are alphabetical order global followed by local includes, locals always use "", We don't use <Qt/...> unless needed.
#include <alib> #include <Zlib> #include "a.../...h" #include "mainwindow.h" #include "z.../...h"
For / If / else and Similar
for (...) { ... } if (...) { ... } else { ... }
Lambdas use this style
... [this](...) { ... } ... [this] { ... }
Initializers for methods and longer functions calls such as those to QMessageBox should use this style
QMessageBox::Type ( this , ... , ... , ... ); void MainWindow::MainWindow() : QWidget(parent) , counter(5) , i(65)
Also use Lays' and Patrick's Kde email addresses