Fix syntax highlighting in CONTRIBUTING.md (#2997)

Code snippets are now marked as cpp so that GitHub highlights them
correctly.
This commit is contained in:
Gianluca Recchia 2019-04-13 16:31:43 +02:00 committed by Janek Bevendorff
parent d5d51d668f
commit c3ae446fd9

View File

@ -125,7 +125,7 @@ For **C++ files** (*.cpp .h*): 4 spaces
For **Qt-UI files** (*.ui*): 2 spaces
#### Includes
```c
```cpp
// Class includes
#include "MyWidget.h"
#include "ui_MyWidget.h"
@ -140,7 +140,7 @@ For **Qt-UI files** (*.ui*): 2 spaces
```
#### Classes
```c
```cpp
// Note: order is important, stay organized!
class MyWidget : public QWidget
{
@ -174,13 +174,13 @@ MyWidget::MyWidget(QWidget* parent)
```
#### Pointers / References
```c
```cpp
int* count;
const QString& string;
```
#### Braces
```c
```cpp
if (condition) {
doSomething();
} else {
@ -194,7 +194,7 @@ void ExampleClass::exampleFunction()
```
#### Switch statement
```c
```cpp
// Note: avoid declaring variables in a switch statement
switch (a) {
case 1: