Skip to content

Commit 3709b6e

Browse files
committed
Format includes using clang-format
1 parent f094399 commit 3709b6e

276 files changed

Lines changed: 967 additions & 1001 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,20 @@ BreakTemplateDeclarations: Yes
5050
# clang-format does not handle that.
5151
AllowShortFunctionsOnASingleLine: Inline
5252

53-
# The coding style specifies some include order categories, but also tells to
54-
# separate categories with an empty line. It does not specify the order within
55-
# the categories. Since the SortInclude feature of clang-format does not
56-
# re-order includes separated by empty lines, the feature is not used.
57-
SortIncludes: false
53+
# Sort includes and regroup them into consistent blocks:
54+
# 0. self include (the .h matching the .cpp, automatic)
55+
# 1. project includes ""
56+
# 2. Qt includes <Q...>
57+
# 3. system includes <...>
58+
SortIncludes: CaseSensitive
59+
IncludeBlocks: Regroup
60+
IncludeCategories:
61+
- Regex: "^\""
62+
Priority: 1
63+
- Regex: "^<Q"
64+
Priority: 2
65+
- Regex: "^<"
66+
Priority: 3
5867

5968
# macros for which the opening brace stays attached.
6069
ForEachMacros: [ foreach, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]

YACReader/bookmarks_dialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#include "bookmarks_dialog.h"
22

3-
#include <QGridLayout>
4-
#include <QLabel>
3+
#include "bookmarks.h"
4+
55
#include <QApplication>
66
#include <QFrame>
7+
#include <QGridLayout>
78
#include <QImage>
9+
#include <QLabel>
810
#include <QScreen>
911

10-
#include "bookmarks.h"
11-
1212
BookmarksDialog::BookmarksDialog(QWidget *parent)
1313
: QDialog(parent)
1414
{

YACReader/bookmarks_dialog.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#ifndef __BOOKMARKS_DIALOG_H
22
#define __BOOKMARKS_DIALOG_H
33

4-
#include <QWidget>
4+
#include "bookmarks.h"
5+
56
#include <QDialog>
6-
#include <QLabel>
7-
#include <QPushButton>
87
#include <QEvent>
98
#include <QKeyEvent>
9+
#include <QLabel>
1010
#include <QPropertyAnimation>
11-
12-
#include "bookmarks.h"
11+
#include <QPushButton>
12+
#include <QWidget>
1313

1414
class BookmarksDialog : public QDialog
1515
{

YACReader/configuration.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#include "configuration.h"
22

3-
#include <QFile>
4-
#include <QFile>
5-
#include <QTextStream>
63
#include <QCoreApplication>
7-
#include <QStringList>
4+
#include <QFile>
85
#include <QMessageBox>
6+
#include <QStringList>
7+
#include <QTextStream>
98

109
Configuration::Configuration()
1110
{

YACReader/configuration.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#ifndef __CONFIGURATION_H
22
#define __CONFIGURATION_H
33

4+
#include "resize_image.h"
5+
#include "yacreader_global_gui.h"
6+
47
#include <QByteArray>
5-
#include <QString>
6-
#include <QSize>
7-
#include <QObject>
88
#include <QColor>
9-
#include <QSettings>
109
#include <QDate>
11-
12-
#include "yacreader_global_gui.h"
13-
#include "resize_image.h"
10+
#include <QObject>
11+
#include <QSettings>
12+
#include <QSize>
13+
#include <QString>
1414

1515
#define CONF_FILE_PATH "."
1616
#define SLIDE_ASPECT_RATIO 1.585

YACReader/continuous_page_widget.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#include "continuous_page_widget.h"
2+
3+
#include "configuration.h"
24
#include "continuous_view_model.h"
35
#include "render.h"
46
#include "resize_image.h"
5-
#include "configuration.h"
67

7-
#include <QPainter>
88
#include <QPaintEvent>
9+
#include <QPainter>
910

1011
ContinuousPageWidget::ContinuousPageWidget(QWidget *parent)
1112
: QWidget(parent)

YACReader/continuous_page_widget.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef CONTINUOUS_PAGE_WIDGET_H
22
#define CONTINUOUS_PAGE_WIDGET_H
33

4-
#include <QWidget>
5-
#include <QSize>
6-
#include <QVector>
4+
#include "themable.h"
5+
76
#include <QHash>
87
#include <QList>
9-
10-
#include "themable.h"
8+
#include <QSize>
9+
#include <QVector>
10+
#include <QWidget>
1111

1212
class Render;
1313
class ContinuousViewModel;

YACReader/continuous_view_model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "continuous_view_model.h"
22

3-
#include <QtMath>
43
#include <QWidget>
4+
#include <QtMath>
55

66
#include <algorithm>
77
#include <limits>

YACReader/goto_dialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "goto_dialog.h"
22

33
#include <QHBoxLayout>
4-
#include <QVBoxLayout>
54
#include <QIntValidator>
5+
#include <QVBoxLayout>
66

77
GoToDialog::GoToDialog(QWidget *parent)
88
: QDialog(parent)

YACReader/goto_dialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
#define __GOTODIALOG_H
33

44
#include <QDialog>
5+
#include <QIntValidator>
56
#include <QLabel>
67
#include <QLineEdit>
78
#include <QPushButton>
8-
#include <QIntValidator>
99

1010
class GoToDialog : public QDialog
1111
{

0 commit comments

Comments
 (0)