Skip to content

Commit ad5ad6c

Browse files
kreuzbergerursfassler
authored andcommitted
fix clang-format of driver
1 parent 9d89a24 commit ad5ad6c

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

src/drivers/QtTestDriver.cpp

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,51 @@
11
#include "cucumber-cpp/internal/drivers/QtTestDriver.hpp"
22

3-
#include <QtTest/QtTest>
4-
#include <QTextStream>
53
#include <QTemporaryFile>
4+
#include <QTextStream>
5+
#include <QtTest/QtTest>
66

77
namespace cucumber {
88
namespace internal {
99

10-
11-
// wraps the QTemporaryFile creation
12-
// on Windows the file could not be written as long as QTemporaryFile owner of the file.
10+
/**
11+
* Wraps the QTemporaryFile creation
12+
*
13+
* On Windows the file could not be written as long as QTemporaryFile owner of the file.
14+
*/
1315
class TemporaryFileWrapper {
1416
public:
15-
static TemporaryFileWrapper create()
16-
{
17+
static TemporaryFileWrapper create() {
1718
QTemporaryFile tempFile{};
1819

19-
if(!tempFile.open()) {
20+
if (!tempFile.open()) {
2021
return {};
2122
}
2223

2324
return {tempFile.fileName() + ".txt"};
2425
}
2526

26-
TemporaryFileWrapper(): filename{} {
27+
TemporaryFileWrapper() :
28+
filename{} {
2729
}
2830

29-
TemporaryFileWrapper(QString filename): filename{filename} {
31+
TemporaryFileWrapper(QString filename) :
32+
filename{filename} {
3033
}
3134

3235
~TemporaryFileWrapper() {
3336
QFile::remove(filename);
3437
}
3538

36-
bool exists() const { return !filename.isEmpty(); }
39+
bool exists() const {
40+
return !filename.isEmpty();
41+
}
3742

3843
QString name() const {
3944
return filename;
4045
}
4146

4247
QString read() const {
43-
QFile file{ filename };
48+
QFile file{filename};
4449
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
4550
return QString();
4651
QTextStream in(&file);

0 commit comments

Comments
 (0)