summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-12-06 16:53:58 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-12-07 12:59:05 +0000
commit1afdcac8e81c199f0312c16b42227a005b6a7701 (patch)
treedf2d4c2a574f44f9e986c5cbde1828a7d17021c0
parent71827d21185c4f3d3fc5f069d7d3665cfba311df (diff)
Apply coding standard to includes
Change-Id: I367506911e9a6827b775bbb99606e3a6dac75f1c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--app/main.cpp21
-rw-r--r--app/perfattributes.cpp1
-rw-r--r--app/perfattributes.h2
-rw-r--r--app/perfdata.cpp3
-rw-r--r--app/perfdata.h2
-rw-r--r--app/perfelfmap.cpp2
-rw-r--r--app/perffeatures.cpp2
-rw-r--r--app/perffeatures.h2
-rw-r--r--app/perfheader.cpp1
-rw-r--r--app/perfheader.h2
-rw-r--r--app/perfkallsyms.h2
-rw-r--r--app/perfregisterinfo.cpp1
-rw-r--r--app/perfstdin.cpp2
-rw-r--r--app/perfsymboltable.cpp5
-rw-r--r--app/perfsymboltable.h3
-rw-r--r--app/perftracingdata.cpp5
-rw-r--r--app/perftracingdata.h2
-rw-r--r--app/perfunwind.cpp6
-rw-r--r--app/perfunwind.h11
-rw-r--r--tests/auto/elfmap/tst_elfmap.cpp8
-rw-r--r--tests/auto/kallsyms/tst_kallsyms.cpp8
-rw-r--r--tests/auto/perfdata/tst_perfdata.cpp14
-rw-r--r--tests/auto/shared/perfparsertestclient.cpp2
-rw-r--r--tests/auto/shared/perfparsertestclient.h6
24 files changed, 64 insertions, 49 deletions
diff --git a/app/main.cpp b/app/main.cpp
index e388c53..5625f0a 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -18,26 +18,27 @@
**
****************************************************************************/
-#include "perfheader.h"
#include "perfattributes.h"
-#include "perffeatures.h"
#include "perfdata.h"
-#include "perfunwind.h"
+#include "perffeatures.h"
+#include "perfheader.h"
#include "perfregisterinfo.h"
#include "perfstdin.h"
+#include "perfunwind.h"
-#include <QFile>
-#include <QDir>
-#include <QDebug>
-#include <QtEndian>
-#include <QCoreApplication>
+#include <QAbstractSocket>
#include <QCommandLineParser>
+#include <QCoreApplication>
+#include <QDebug>
+#include <QDir>
+#include <QFile>
#include <QScopedPointer>
-#include <QAbstractSocket>
#include <QTcpSocket>
#include <QTimer>
-#include <limits>
+#include <QtEndian>
+
#include <cstring>
+#include <limits>
#ifdef Q_OS_WIN
#include <io.h>
diff --git a/app/perfattributes.cpp b/app/perfattributes.cpp
index 50d1f76..6e6aa61 100644
--- a/app/perfattributes.cpp
+++ b/app/perfattributes.cpp
@@ -20,6 +20,7 @@
#include "perfattributes.h"
#include "perfdata.h"
+
#include <QDebug>
PerfEventAttributes::PerfEventAttributes()
diff --git a/app/perfattributes.h b/app/perfattributes.h
index ef02ce6..2263459 100644
--- a/app/perfattributes.h
+++ b/app/perfattributes.h
@@ -23,9 +23,9 @@
#include "perffilesection.h"
#include "perfheader.h"
-#include <QIODevice>
#include <QDataStream>
#include <QHash>
+#include <QIODevice>
class PerfEventAttributes {
public:
diff --git a/app/perfdata.cpp b/app/perfdata.cpp
index dcfe431..ba1d05e 100644
--- a/app/perfdata.cpp
+++ b/app/perfdata.cpp
@@ -19,10 +19,11 @@
****************************************************************************/
#include "perfdata.h"
-#include "perfunwind.h"
#include "perftracingdata.h"
+#include "perfunwind.h"
#include <QDebug>
+
#include <limits>
static const int intMax = std::numeric_limits<int>::max();
diff --git a/app/perfdata.h b/app/perfdata.h
index 0d44a9f..2ab71ee 100644
--- a/app/perfdata.h
+++ b/app/perfdata.h
@@ -20,9 +20,9 @@
#pragma once
-#include "perfheader.h"
#include "perfattributes.h"
#include "perffeatures.h"
+#include "perfheader.h"
#include <QIODevice>
diff --git a/app/perfelfmap.cpp b/app/perfelfmap.cpp
index 545f362..c3d43e5 100644
--- a/app/perfelfmap.cpp
+++ b/app/perfelfmap.cpp
@@ -18,8 +18,8 @@
**
****************************************************************************/
-#include "perfelfmap.h"
#include "perfdata.h"
+#include "perfelfmap.h"
#include <QDebug>
diff --git a/app/perffeatures.cpp b/app/perffeatures.cpp
index 0d43802..5dd00c3 100644
--- a/app/perffeatures.cpp
+++ b/app/perffeatures.cpp
@@ -19,7 +19,9 @@
****************************************************************************/
#include "perffeatures.h"
+
#include <QDebug>
+
#include <limits>
// TODO: What to do if feature flags are set but features don't really exist in the file?
diff --git a/app/perffeatures.h b/app/perffeatures.h
index de96850..378c6a0 100644
--- a/app/perffeatures.h
+++ b/app/perffeatures.h
@@ -20,8 +20,8 @@
#pragma once
-#include "perfheader.h"
#include "perfattributes.h"
+#include "perfheader.h"
#include "perftracingdata.h"
#include <QHash>
diff --git a/app/perfheader.cpp b/app/perfheader.cpp
index 99a738f..b34e31b 100644
--- a/app/perfheader.cpp
+++ b/app/perfheader.cpp
@@ -19,6 +19,7 @@
****************************************************************************/
#include "perfheader.h"
+
#include <QDebug>
PerfHeader::PerfHeader(QIODevice *source) :
diff --git a/app/perfheader.h b/app/perfheader.h
index 1c65bbe..47d7a5f 100644
--- a/app/perfheader.h
+++ b/app/perfheader.h
@@ -22,8 +22,8 @@
#include "perffilesection.h"
-#include <QIODevice>
#include <QDataStream>
+#include <QIODevice>
class PerfHeader : public QObject {
Q_OBJECT
diff --git a/app/perfkallsyms.h b/app/perfkallsyms.h
index 9e26b42..38acca8 100644
--- a/app/perfkallsyms.h
+++ b/app/perfkallsyms.h
@@ -19,8 +19,8 @@
#pragma once
-#include <QCoreApplication>
#include <QByteArray>
+#include <QCoreApplication>
#include <QVector>
struct PerfKallsymEntry
diff --git a/app/perfregisterinfo.cpp b/app/perfregisterinfo.cpp
index 4caf3ea..4d87397 100644
--- a/app/perfregisterinfo.cpp
+++ b/app/perfregisterinfo.cpp
@@ -19,6 +19,7 @@
****************************************************************************/
#include "perfregisterinfo.h"
+
#include <QByteArray>
#include <QRegularExpression>
diff --git a/app/perfstdin.cpp b/app/perfstdin.cpp
index ecabe45..c5af9b4 100644
--- a/app/perfstdin.cpp
+++ b/app/perfstdin.cpp
@@ -19,7 +19,9 @@
****************************************************************************/
#include "perfstdin.h"
+
#include <QTimer>
+
#include <cstdio>
#include <limits>
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp
index a718566..5b3c41f 100644
--- a/app/perfsymboltable.cpp
+++ b/app/perfsymboltable.cpp
@@ -22,16 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+
#include "perfsymboltable.h"
#include "perfunwind.h"
+
#include <dwarf.h>
-#include <QDir>
#include <QDebug>
+#include <QDir>
#include <QStack>
#include <cstring>
#include <fcntl.h>
+
#ifdef Q_OS_WIN
#include <io.h>
extern "C" {
diff --git a/app/perfsymboltable.h b/app/perfsymboltable.h
index f846a4b..f47e9f2 100644
--- a/app/perfsymboltable.h
+++ b/app/perfsymboltable.h
@@ -26,10 +26,11 @@
#pragma once
#include "perfdata.h"
-#include "perfunwind.h"
#include "perfelfmap.h"
+#include "perfunwind.h"
#include <libdwfl.h>
+
#include <QObject>
class PerfSymbolTable
diff --git a/app/perftracingdata.cpp b/app/perftracingdata.cpp
index 180a693..c58eb99 100644
--- a/app/perftracingdata.cpp
+++ b/app/perftracingdata.cpp
@@ -18,11 +18,12 @@
**
****************************************************************************/
-#include "perftracingdata.h"
#include "perfattributes.h"
+#include "perftracingdata.h"
+
+#include <QBuffer>
#include <QDataStream>
#include <QDebug>
-#include <QBuffer>
#include <functional>
diff --git a/app/perftracingdata.h b/app/perftracingdata.h
index 18dbb10..4427f8d 100644
--- a/app/perftracingdata.h
+++ b/app/perftracingdata.h
@@ -21,8 +21,8 @@
#pragma once
#include <QByteArray>
-#include <QVector>
#include <QHash>
+#include <QVector>
enum FormatFlags
{
diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp
index 6be1ffc..236f9eb 100644
--- a/app/perfunwind.cpp
+++ b/app/perfunwind.cpp
@@ -18,14 +18,14 @@
**
****************************************************************************/
-#include "perfunwind.h"
#include "perfregisterinfo.h"
#include "perfsymboltable.h"
+#include "perfunwind.h"
#include <QDebug>
-#include <QtEndian>
-#include <QVersionNumber>
#include <QDir>
+#include <QVersionNumber>
+#include <QtEndian>
#include <cstring>
diff --git a/app/perfunwind.h b/app/perfunwind.h
index d381d8c..a31d1c3 100644
--- a/app/perfunwind.h
+++ b/app/perfunwind.h
@@ -21,19 +21,20 @@
#pragma once
#include "perfdata.h"
-#include "perfregisterinfo.h"
#include "perfkallsyms.h"
+#include "perfregisterinfo.h"
#include "perftracingdata.h"
#include <libdwfl.h>
-#include <QObject>
-#include <QList>
+#include <QByteArray>
+#include <QDir>
#include <QHash>
#include <QIODevice>
-#include <QByteArray>
+#include <QList>
+#include <QObject>
#include <QString>
-#include <QDir>
+
#include <limits>
diff --git a/tests/auto/elfmap/tst_elfmap.cpp b/tests/auto/elfmap/tst_elfmap.cpp
index d56442b..58ce323 100644
--- a/tests/auto/elfmap/tst_elfmap.cpp
+++ b/tests/auto/elfmap/tst_elfmap.cpp
@@ -17,12 +17,12 @@
**
****************************************************************************/
-#include <QObject>
-#include <QTest>
+#include "perfelfmap.h"
+
#include <QDebug>
+#include <QObject>
#include <QTemporaryFile>
-
-#include "perfelfmap.h"
+#include <QTest>
namespace {
bool registerElf(PerfElfMap *map, const PerfElfMap::ElfInfo &info)
diff --git a/tests/auto/kallsyms/tst_kallsyms.cpp b/tests/auto/kallsyms/tst_kallsyms.cpp
index d9f7c31..4b3a84e 100644
--- a/tests/auto/kallsyms/tst_kallsyms.cpp
+++ b/tests/auto/kallsyms/tst_kallsyms.cpp
@@ -17,12 +17,12 @@
**
****************************************************************************/
-#include <QObject>
-#include <QTest>
+#include "perfkallsyms.h"
+
#include <QDebug>
+#include <QObject>
#include <QTemporaryFile>
-
-#include "perfkallsyms.h"
+#include <QTest>
class TestKallsyms : public QObject
{
diff --git a/tests/auto/perfdata/tst_perfdata.cpp b/tests/auto/perfdata/tst_perfdata.cpp
index 2b3344c..e9fc85f 100644
--- a/tests/auto/perfdata/tst_perfdata.cpp
+++ b/tests/auto/perfdata/tst_perfdata.cpp
@@ -17,17 +17,17 @@
**
****************************************************************************/
-#include <QObject>
-#include <QTest>
+#include "perfdata.h"
+#include "perfparsertestclient.h"
+#include "perfunwind.h"
+
#include <QBuffer>
-#include <QSignalSpy>
#include <QDebug>
+#include <QObject>
+#include <QSignalSpy>
+#include <QTest>
#include <QtEndian>
-#include "perfdata.h"
-#include "perfunwind.h"
-#include "perfparsertestclient.h"
-
class TestPerfData : public QObject
{
Q_OBJECT
diff --git a/tests/auto/shared/perfparsertestclient.cpp b/tests/auto/shared/perfparsertestclient.cpp
index a3766a5..7d2ba30 100644
--- a/tests/auto/shared/perfparsertestclient.cpp
+++ b/tests/auto/shared/perfparsertestclient.cpp
@@ -17,8 +17,8 @@
**
****************************************************************************/
-#include "perfparsertestclient.h"
#include "perffeatures.h"
+#include "perfparsertestclient.h"
#include <QtEndian>
#include <QtTest>
diff --git a/tests/auto/shared/perfparsertestclient.h b/tests/auto/shared/perfparsertestclient.h
index cdc5808..5604884 100644
--- a/tests/auto/shared/perfparsertestclient.h
+++ b/tests/auto/shared/perfparsertestclient.h
@@ -19,11 +19,11 @@
#pragma once
-#include <QObject>
-#include <QIODevice>
-#include <QVector>
#include <QHash>
+#include <QIODevice>
+#include <QObject>
#include <QVariant>
+#include <QVector>
class PerfParserTestClient : public QObject
{