summaryrefslogtreecommitdiff
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-04-29 10:53:13 -0400
committerBrad King <brad.king@kitware.com>2016-04-29 13:58:54 -0400
commite1c7747253ac71a5215dd32a910b62a1fd8c561a (patch)
treedd4f8bf9663bf7a64c01d9391c3559f7b419dcb7 /Source/QtDialog
parent180538c70634dd6dc7fc68b4afbc1cd288c5b5c6 (diff)
downloadcmake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.tar.gz
Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/AddCacheEntry.cxx2
-rw-r--r--Source/QtDialog/AddCacheEntry.h2
-rw-r--r--Source/QtDialog/CMakeSetup.cxx14
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx26
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h4
-rw-r--r--Source/QtDialog/FirstConfigure.cxx4
-rw-r--r--Source/QtDialog/QCMake.cxx4
-rw-r--r--Source/QtDialog/QCMake.h8
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx8
-rw-r--r--Source/QtDialog/QCMakeCacheView.h4
-rw-r--r--Source/QtDialog/QCMakeWidgets.cxx4
-rw-r--r--Source/QtDialog/QCMakeWidgets.h2
-rw-r--r--Source/QtDialog/RegexExplorer.h4
-rw-r--r--Source/QtDialog/WarningMessagesDialog.h2
14 files changed, 44 insertions, 44 deletions
diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx
index b575f757ec..efb2b6555b 100644
--- a/Source/QtDialog/AddCacheEntry.cxx
+++ b/Source/QtDialog/AddCacheEntry.cxx
@@ -12,8 +12,8 @@
#include "AddCacheEntry.h"
-#include <QMetaProperty>
#include <QCompleter>
+#include <QMetaProperty>
static const int NumTypes = 4;
static const int DefaultTypeIndex = 0;
diff --git a/Source/QtDialog/AddCacheEntry.h b/Source/QtDialog/AddCacheEntry.h
index c327915b01..7c08af6a84 100644
--- a/Source/QtDialog/AddCacheEntry.h
+++ b/Source/QtDialog/AddCacheEntry.h
@@ -15,9 +15,9 @@
#include "QCMake.h"
-#include <QWidget>
#include <QCheckBox>
#include <QStringList>
+#include <QWidget>
#include "ui_AddCacheEntry.h"
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 72adb8d755..b44219fdd0 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -11,19 +11,19 @@
============================================================================*/
#include "QCMake.h" // include to disable MS warnings
+#include "CMakeSetupDialog.h"
+#include "cmAlgorithms.h"
+#include "cmDocumentation.h"
+#include "cmVersion.h"
+#include "cmake.h"
#include <QApplication>
#include <QDir>
-#include <QTranslator>
#include <QLocale>
#include <QTextCodec>
-#include "CMakeSetupDialog.h"
-#include "cmDocumentation.h"
-#include "cmake.h"
-#include "cmVersion.h"
-#include "cmAlgorithms.h"
+#include <QTranslator>
#include <cmsys/CommandLineArguments.hxx>
-#include <cmsys/SystemTools.hxx>
#include <cmsys/Encoding.hxx>
+#include <cmsys/SystemTools.hxx>
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][2] =
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index f25f402324..945739d8f6 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -12,28 +12,28 @@
#include "CMakeSetupDialog.h"
-#include <QFileDialog>
-#include <QProgressBar>
-#include <QMessageBox>
-#include <QStatusBar>
-#include <QToolButton>
-#include <QDialogButtonBox>
#include <QCloseEvent>
#include <QCoreApplication>
-#include <QSettings>
+#include <QDialogButtonBox>
+#include <QDragEnterEvent>
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QKeySequence>
#include <QMenu>
#include <QMenuBar>
-#include <QDragEnterEvent>
+#include <QMessageBox>
#include <QMimeData>
-#include <QUrl>
+#include <QProgressBar>
+#include <QSettings>
#include <QShortcut>
-#include <QKeySequence>
-#include <QInputDialog>
+#include <QStatusBar>
+#include <QToolButton>
+#include <QUrl>
-#include "QCMake.h"
-#include "QCMakeCacheView.h"
#include "AddCacheEntry.h"
#include "FirstConfigure.h"
+#include "QCMake.h"
+#include "QCMakeCacheView.h"
#include "RegexExplorer.h"
#include "WarningMessagesDialog.h"
#include "cmSystemTools.h"
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index eaac61c6a2..f9624d1d9f 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -15,10 +15,10 @@
#include "QCMake.h"
+#include "ui_CMakeSetupDialog.h"
+#include <QEventLoop>
#include <QMainWindow>
#include <QThread>
-#include <QEventLoop>
-#include "ui_CMakeSetupDialog.h"
class QCMakeThread;
class CMakeCacheModel;
diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx
index 64fe676054..5c0af2b36d 100644
--- a/Source/QtDialog/FirstConfigure.cxx
+++ b/Source/QtDialog/FirstConfigure.cxx
@@ -3,9 +3,9 @@
#include "Compilers.h"
-#include <QSettings>
-#include <QRadioButton>
#include <QComboBox>
+#include <QRadioButton>
+#include <QSettings>
#include <QVBoxLayout>
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index dd7c1387a0..28be341665 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -12,12 +12,12 @@
#include "QCMake.h"
-#include <QDir>
#include <QCoreApplication>
+#include <QDir>
+#include "cmExternalMakefileProjectGenerator.h"
#include "cmState.h"
#include "cmSystemTools.h"
-#include "cmExternalMakefileProjectGenerator.h"
#ifdef Q_OS_WIN
#include "qt_windows.h" // For SetErrorMode
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index ca6f0f4a1c..5cae06d4aa 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -22,13 +22,13 @@
#include <vector>
+#include <QAtomicInt>
+#include <QList>
+#include <QMetaType>
#include <QObject>
#include <QString>
-#include <QVariant>
-#include <QList>
#include <QStringList>
-#include <QMetaType>
-#include <QAtomicInt>
+#include <QVariant>
/// struct to represent cmake properties in Qt
/// Value is of type String or Bool
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index bae6a30a74..f64a78a295 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -12,14 +12,14 @@
#include "QCMakeCacheView.h"
+#include <QApplication>
+#include <QEvent>
#include <QHBoxLayout>
#include <QHeaderView>
-#include <QEvent>
-#include <QStyle>
#include <QKeyEvent>
-#include <QSortFilterProxyModel>
#include <QMetaProperty>
-#include <QApplication>
+#include <QSortFilterProxyModel>
+#include <QStyle>
#include "QCMakeWidgets.h"
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index 5ac09665ce..5631b8615d 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -15,10 +15,10 @@
#include "QCMake.h"
-#include <QTreeView>
+#include <QItemDelegate>
#include <QSet>
#include <QStandardItemModel>
-#include <QItemDelegate>
+#include <QTreeView>
class QSortFilterProxyModel;
class QCMakeCacheModel;
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index 41f98b5d24..7803ef3078 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -13,10 +13,10 @@
#include "QCMakeWidgets.h"
#include <QDirModel>
-#include <QFileInfo>
#include <QFileDialog>
-#include <QToolButton>
+#include <QFileInfo>
#include <QResizeEvent>
+#include <QToolButton>
QCMakeFileEditor::QCMakeFileEditor(QWidget* p, const QString& var)
: QLineEdit(p), Variable(var)
diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h
index 22072827ea..759b635bee 100644
--- a/Source/QtDialog/QCMakeWidgets.h
+++ b/Source/QtDialog/QCMakeWidgets.h
@@ -13,9 +13,9 @@
#ifndef QCMakeWidgets_h
#define QCMakeWidgets_h
-#include <QLineEdit>
#include <QComboBox>
#include <QCompleter>
+#include <QLineEdit>
class QToolButton;
diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h
index 2ac9c3e2ee..3ac8a24950 100644
--- a/Source/QtDialog/RegexExplorer.h
+++ b/Source/QtDialog/RegexExplorer.h
@@ -13,9 +13,9 @@
#ifndef RegexExplorer_h
#define RegexExplorer_h
-#include <string>
-#include <cmsys/RegularExpression.hxx>
#include <QDialog>
+#include <cmsys/RegularExpression.hxx>
+#include <string>
#include "ui_RegexExplorer.h"
diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h
index 6c274a71d9..4bb739c484 100644
--- a/Source/QtDialog/WarningMessagesDialog.h
+++ b/Source/QtDialog/WarningMessagesDialog.h
@@ -16,8 +16,8 @@
#include <QDialog>
#include <QWidget>
-#include "ui_WarningMessagesDialog.h"
#include "QCMake.h"
+#include "ui_WarningMessagesDialog.h"
/**
* Dialog window for setting the warning message related options.