fix formating

This commit is contained in:
arcan1s 2015-10-08 01:14:30 +03:00
parent f1e6f74c7d
commit 6f86e8ec5e

View File

@ -25,11 +25,13 @@ for more details. Some additional detail see below.
* Any header should have [include guard](https://en.wikipedia.org/wiki/Include_guard)
named as `CLASSNAMECAPS_H`
* If any `#if` directive is used condition should be mentioned in `#endif`:
```
#if (FOO)
someCodeInside();
#endif /* FOO */
```
* `Q_PROPERTY` macro is allowed and recommended for QObject based classes.
* Qt macros (e.g. `signals`, `slots`, `Q_OBJECT`, etc) are allowed.
* Current project standard is **C++11**.
@ -40,11 +42,13 @@ for more details. Some additional detail see below.
of `reinterpret_cast` is not recommended. It is highly recommended to use
`dynamic_Cast` with the exception catching. It is also possible to use
`qvariant_cast` if required. Exception is class constructors, e.g.:
```
char c = 'c';
std::string s = "string";
qDebug() << QString("some string") << QChar(c) << QString(s);
```
* C-like `NULL`, use `nullptr` instead.
* It is highly recommended to avoid implicit casts.
* Abstract classes (which has at least one pure virtual method) are allowed.
@ -103,11 +107,13 @@ Development
* For experimental features development new branch `feature-foo` creation is allowed
and recommended.
* Experimental features should be added inside `BUILD_FUTURE` definition:
```
#ifdef BUILD_FUTURE
someTestFunctionInside();
#endif /* BUILD_FUTURE */
```
* Any project specific build variable should be mentioned inside `version.h` as
well.
@ -152,6 +158,7 @@ Tools
* For QString concatenation use `QString::arg` method.
* Any source file should have license header:
```
/***************************************************************************
* This file is part of awesome-widgets *
@ -170,7 +177,9 @@ Tools
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
```
* Recommended class constructor for QObject based classes:
```
FooClass::FooClass(QObject *parent, const QVariant var)
: QObject(parent),
@ -180,7 +189,9 @@ FooClass::FooClass(QObject *parent, const QVariant var)
// some code below if any
}
```
* Property usage:
```
Q_PROPERTY(bool prop READ prop WRITE setProp);
public: