summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-04-29 14:53:13 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-29 17:58:54 (GMT)
commite1c7747253ac71a5215dd32a910b62a1fd8c561a (patch)
treedd4f8bf9663bf7a64c01d9391c3559f7b419dcb7 /Source/QtDialog
parent180538c70634dd6dc7fc68b4afbc1cd288c5b5c6 (diff)
downloadCMake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.zip
CMake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.tar.gz
CMake-e1c7747253ac71a5215dd32a910b62a1fd8c561a.tar.bz2
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 b575f75..efb2b65 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 c327915..7c08af6 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 72adb8d..b44219f 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 f25f402..945739d 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 eaac61c..f9624d1 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 64fe676..5c0af2b 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 dd7c138..28be341 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 ca6f0f4..5cae06d 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 bae6a30..f64a78a 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 5ac0966..5631b86 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 41f98b5..7803ef3 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 2207282..759b635 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 2ac9c3e..3ac8a24 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 6c274a7..4bb739c 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.