Merge pull request #8292 from glassez/coding-style

Require '#pragma once' in new code
This commit is contained in:
Vladimir Golovnev 2018-01-21 20:05:42 +03:00 committed by GitHub
commit 4386fd9f89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,7 +240,23 @@ Example:
```
### 9. Misc. ###
### 9. Include guard. ###
`#pragma once` should be used instead of "include guard" in new code:
```c++
// examplewidget.h
#pragma once
#include <QWidget>
class ExampleWidget : public QWidget
{
// (some code omitted)
};
```
### 10. Misc. ###
* Line breaks for long lines with operation: