mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
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:
parent
d5d51d668f
commit
c3ae446fd9
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@ -125,7 +125,7 @@ For **C++ files** (*.cpp .h*): 4 spaces
|
|||||||
For **Qt-UI files** (*.ui*): 2 spaces
|
For **Qt-UI files** (*.ui*): 2 spaces
|
||||||
|
|
||||||
#### Includes
|
#### Includes
|
||||||
```c
|
```cpp
|
||||||
// Class includes
|
// Class includes
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
#include "ui_MyWidget.h"
|
#include "ui_MyWidget.h"
|
||||||
@ -140,7 +140,7 @@ For **Qt-UI files** (*.ui*): 2 spaces
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Classes
|
#### Classes
|
||||||
```c
|
```cpp
|
||||||
// Note: order is important, stay organized!
|
// Note: order is important, stay organized!
|
||||||
class MyWidget : public QWidget
|
class MyWidget : public QWidget
|
||||||
{
|
{
|
||||||
@ -174,13 +174,13 @@ MyWidget::MyWidget(QWidget* parent)
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Pointers / References
|
#### Pointers / References
|
||||||
```c
|
```cpp
|
||||||
int* count;
|
int* count;
|
||||||
const QString& string;
|
const QString& string;
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Braces
|
#### Braces
|
||||||
```c
|
```cpp
|
||||||
if (condition) {
|
if (condition) {
|
||||||
doSomething();
|
doSomething();
|
||||||
} else {
|
} else {
|
||||||
@ -194,7 +194,7 @@ void ExampleClass::exampleFunction()
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Switch statement
|
#### Switch statement
|
||||||
```c
|
```cpp
|
||||||
// Note: avoid declaring variables in a switch statement
|
// Note: avoid declaring variables in a switch statement
|
||||||
switch (a) {
|
switch (a) {
|
||||||
case 1:
|
case 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user