Compare commits

..

3 Commits

Author SHA1 Message Date
d0f64ef440 Re-formatted all source files 2019-10-05 16:14:45 +02:00
Michael Mandl
5c6ed8191b Merge branch 'master' into develop 2019-02-17 19:50:20 +01:00
bb06f17de0 Merge branch 'master' into develop 2019-02-17 17:33:59 +01:00
77 changed files with 2443 additions and 2332 deletions

118
.clang-format Executable file
View File

@ -0,0 +1,118 @@
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: '^(BEGIN|IMPLEMENT)_.*_MAP$'
MacroBlockEnd: '^END_.*_MAP$'
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 1000000
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: false
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 4
UseTab: Never

View File

@ -2,8 +2,7 @@
#include <numeric> #include <numeric>
CheckableTest::CheckableTest( CheckableTest::CheckableTest(const char* name, std::initializer_list<std::string> items)
const char *name, std::initializer_list<std::string> items)
: m_name(name) : m_name(name)
, m_items(items) , m_items(items)
{ {

View File

@ -38,4 +38,3 @@ private:
CheckableItem& getItem(const QModelIndex& index); CheckableItem& getItem(const QModelIndex& index);
const CheckableItem& getItem(const QModelIndex& index) const; const CheckableItem& getItem(const QModelIndex& index) const;
}; };

View File

@ -43,4 +43,3 @@ public:
// clang-format on // clang-format on
} }
}; };

View File

@ -58,8 +58,7 @@ public:
int rowCount(const QModelIndex& parent = QModelIndex()) const override; int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override; int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data( QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
const QModelIndex &index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override; int role = Qt::DisplayRole) const override;

View File

@ -42,4 +42,3 @@ public:
// clang-format on // clang-format on
} }
}; };

View File

@ -9,8 +9,7 @@ class GenitivModel : public LateSkillsModel
public: public:
GenitivModel(QObject* parent); GenitivModel(QObject* parent);
bool setData(const QModelIndex &index, const QVariant &value, bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
int role = Qt::EditRole) override;
void read(const ESGRAF48::LateSkillsGenitivModel& model); void read(const ESGRAF48::LateSkillsGenitivModel& model);
void write(ESGRAF48::LateSkillsGenitivModel& model) const; void write(ESGRAF48::LateSkillsGenitivModel& model) const;

View File

@ -79,7 +79,8 @@ void V2SvkModel::printTests(QPainter &painter) const
{ {
if (emptyItemsStack > 0) if (emptyItemsStack > 0)
{ {
drawGreySquare(painter, {x - emptyItemsStack * resultCellWidth, y, drawGreySquare(painter,
{x - emptyItemsStack * resultCellWidth, y,
emptyItemsStack * resultCellWidth, rowHeight}); emptyItemsStack * resultCellWidth, rowHeight});
emptyItemsStack = 0; emptyItemsStack = 0;
} }
@ -90,7 +91,8 @@ void V2SvkModel::printTests(QPainter &painter) const
} }
if (emptyItemsStack > 0) if (emptyItemsStack > 0)
{ {
drawGreySquare(painter, {x - emptyItemsStack * resultCellWidth, y, drawGreySquare(painter,
{x - emptyItemsStack * resultCellWidth, y,
emptyItemsStack * resultCellWidth, rowHeight}); emptyItemsStack * resultCellWidth, rowHeight});
emptyItemsStack = 0; emptyItemsStack = 0;
} }
@ -134,4 +136,3 @@ void V2SvkModel::printSummary(QPainter &painter, unsigned int v2Points, unsigned
painter.translate(0, 3 * height); painter.translate(0, 3 * height);
} }

View File

@ -6,7 +6,6 @@
#include <QString> #include <QString>
#include <QFont> #include <QFont>
class DataModel; class DataModel;
class QDataWidgetMapper; class QDataWidgetMapper;

View File

@ -4,4 +4,3 @@ TEST_CASE("Dummy")
{ {
REQUIRE(true == true); REQUIRE(true == true);
} }