From 32f756c8226e2026d51307c4722aa6b98939c9e6 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Thu, 1 Sep 2016 21:55:09 +0200 Subject: CursesDialog: include what you use --- Source/CursesDialog/ccmake.cxx | 23 ++++++++++++---------- Source/CursesDialog/cmCursesBoolWidget.cxx | 5 ++++- Source/CursesDialog/cmCursesBoolWidget.h | 3 +++ .../CursesDialog/cmCursesCacheEntryComposite.cxx | 10 ++++++---- Source/CursesDialog/cmCursesCacheEntryComposite.h | 6 +++++- Source/CursesDialog/cmCursesDummyWidget.cxx | 3 +++ Source/CursesDialog/cmCursesDummyWidget.h | 3 +++ Source/CursesDialog/cmCursesFilePathWidget.cxx | 3 +++ Source/CursesDialog/cmCursesFilePathWidget.h | 2 ++ Source/CursesDialog/cmCursesForm.cxx | 2 ++ Source/CursesDialog/cmCursesForm.h | 2 ++ Source/CursesDialog/cmCursesLabelWidget.cxx | 2 ++ Source/CursesDialog/cmCursesLabelWidget.h | 5 +++++ Source/CursesDialog/cmCursesLongMessageForm.cxx | 9 ++++++--- Source/CursesDialog/cmCursesLongMessageForm.h | 6 ++++-- Source/CursesDialog/cmCursesMainForm.cxx | 17 ++++++++-------- Source/CursesDialog/cmCursesMainForm.h | 10 +++++++--- Source/CursesDialog/cmCursesOptionsWidget.cxx | 3 ++- Source/CursesDialog/cmCursesOptionsWidget.h | 6 ++++++ Source/CursesDialog/cmCursesPathWidget.cxx | 4 ++++ Source/CursesDialog/cmCursesPathWidget.h | 7 +++++++ Source/CursesDialog/cmCursesStandardIncludes.h | 2 -- Source/CursesDialog/cmCursesStringWidget.cxx | 7 +++++++ Source/CursesDialog/cmCursesStringWidget.h | 5 +++++ Source/CursesDialog/cmCursesWidget.cxx | 2 ++ Source/CursesDialog/cmCursesWidget.h | 5 ++++- 26 files changed, 116 insertions(+), 36 deletions(-) diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 80bb55d..2e062bc 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -9,19 +9,22 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCursesStandardIncludes.h" - -#include "../cmDocumentation.h" -#include "../cmSystemTools.h" -#include "../cmake.h" - -#include -#include +#include +#include "cmCursesForm.h" #include "cmCursesMainForm.h" -#include +#include "cmCursesStandardIncludes.h" +#include "cmDocumentation.h" +#include "cmDocumentationEntry.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include +#include +#include +#include +#include +#include +#include static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ccmake - Curses Interface for CMake." }, diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 99f7dcc..de95bae 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -11,7 +11,10 @@ ============================================================================*/ #include "cmCursesBoolWidget.h" -#include "cmCursesMainForm.h" +#include "cmCursesWidget.h" +#include "cmState.h" + +#include cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index d2899ee..b9f1b16 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -12,6 +12,9 @@ #ifndef cmCursesBoolWidget_h #define cmCursesBoolWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" class cmCursesMainForm; diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 462cb6e..d115c77 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -11,18 +11,20 @@ ============================================================================*/ #include "cmCursesCacheEntryComposite.h" -#include "../cmState.h" -#include "../cmSystemTools.h" -#include "../cmake.h" #include "cmCursesBoolWidget.h" -#include "cmCursesDummyWidget.h" #include "cmCursesFilePathWidget.h" #include "cmCursesLabelWidget.h" #include "cmCursesOptionsWidget.h" #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" +#include "cmCursesWidget.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmake.h" #include +#include +#include cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( const std::string& key, int labelwidth, int entrywidth) diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index c9c8238..c717e1a 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -12,8 +12,12 @@ #ifndef cmCursesCacheEntryComposite_h #define cmCursesCacheEntryComposite_h -#include "cmCursesLabelWidget.h" +#include // IWYU pragma: keep +#include + +class cmCursesLabelWidget; +class cmCursesWidget; class cmake; class cmCursesCacheEntryComposite diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index a960090..fe73e7e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -11,6 +11,9 @@ ============================================================================*/ #include "cmCursesDummyWidget.h" +#include "cmCursesWidget.h" +#include "cmState.h" + cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index e6ca91e..cf88e6e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -12,6 +12,9 @@ #ifndef cmCursesDummyWidget_h #define cmCursesDummyWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" class cmCursesMainForm; diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 28a74a9..654e0d4 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -11,6 +11,9 @@ ============================================================================*/ #include "cmCursesFilePathWidget.h" +#include "cmCursesPathWidget.h" +#include "cmState.h" + cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h index 72adc77..86c78ce 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.h +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -12,6 +12,8 @@ #ifndef cmCursesFilePathWidget_h #define cmCursesFilePathWidget_h +#include // IWYU pragma: keep + #include "cmCursesPathWidget.h" class cmCursesFilePathWidget : public cmCursesPathWidget diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx index b3320c9..699dabc 100644 --- a/Source/CursesDialog/cmCursesForm.cxx +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesForm.h" +#include + cmsys::ofstream cmCursesForm::DebugFile; bool cmCursesForm::Debug = false; diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index c0192fc..bf97c66 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -12,6 +12,8 @@ #ifndef cmCursesForm_h #define cmCursesForm_h +#include // IWYU pragma: keep + #include "cmCursesStandardIncludes.h" #include diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx index 784738b..0ed9240 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.cxx +++ b/Source/CursesDialog/cmCursesLabelWidget.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesLabelWidget.h" +#include "cmCursesWidget.h" + cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index ff645af..990078b 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -12,8 +12,13 @@ #ifndef cmCursesLabelWidget_h #define cmCursesLabelWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include + class cmCursesMainForm; class cmCursesLabelWidget : public cmCursesWidget diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 47f98a2..75b136c 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -11,10 +11,13 @@ ============================================================================*/ #include "cmCursesLongMessageForm.h" -#include "../cmSystemTools.h" -#include "../cmVersion.h" -#include "../cmake.h" +#include "cmCursesForm.h" #include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmVersion.h" + +#include +#include inline int ctrl(int z) { diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index a12ed2f..f8e8544 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -12,11 +12,13 @@ #ifndef cmCursesLongMessageForm_h #define cmCursesLongMessageForm_h -#include "cmCursesStandardIncludes.h" +#include #include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" -class cmCursesCacheEntryComposite; +#include +#include class cmCursesLongMessageForm : public cmCursesForm { diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 1d036c4..d8d1a7d 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,19 +11,22 @@ ============================================================================*/ #include "cmCursesMainForm.h" -#include "../cmSystemTools.h" -#include "../cmVersion.h" -#include "../cmake.h" #include "cmAlgorithms.h" -#include "cmCursesBoolWidget.h" #include "cmCursesCacheEntryComposite.h" #include "cmCursesDummyWidget.h" -#include "cmCursesFilePathWidget.h" +#include "cmCursesForm.h" #include "cmCursesLabelWidget.h" #include "cmCursesLongMessageForm.h" -#include "cmCursesPathWidget.h" +#include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" +#include "cmCursesWidget.h" #include "cmState.h" +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmake.h" + +#include +#include inline int ctrl(int z) { @@ -742,8 +745,6 @@ void cmCursesMainForm::FixValue(cmState::CacheEntryType type, } } -#include - void cmCursesMainForm::HandleInput() { int x = 0, y = 0; diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index d17ee33..1140945 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -12,13 +12,17 @@ #ifndef cmCursesMainForm_h #define cmCursesMainForm_h -#include "cmCursesStandardIncludes.h" +#include -#include "../cmState.h" #include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmState.h" + +#include +#include +#include class cmCursesCacheEntryComposite; -class cmCursesWidget; class cmake; /** \class cmCursesMainForm diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index 9a88aef..f7a8cc6 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -11,7 +11,8 @@ ============================================================================*/ #include "cmCursesOptionsWidget.h" -#include "cmCursesMainForm.h" +#include "cmCursesWidget.h" +#include "cmState.h" #define ctrl(z) ((z)&037) diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index f88b6bc..80dccad 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -12,8 +12,14 @@ #ifndef cmCursesOptionsWidget_h #define cmCursesOptionsWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include +#include + class cmCursesMainForm; class cmCursesOptionsWidget : public cmCursesWidget diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index 33fffd1..2ee64c7 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -12,8 +12,12 @@ #include "cmCursesPathWidget.h" #include "cmCursesMainForm.h" +#include "cmCursesStringWidget.h" +#include "cmState.h" #include "cmSystemTools.h" +#include + cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index cd26df6..0ffce04 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -12,8 +12,15 @@ #ifndef cmCursesPathWidget_h #define cmCursesPathWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" +#include + +class cmCursesMainForm; + class cmCursesPathWidget : public cmCursesStringWidget { public: diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 0953978..4929958 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -14,8 +14,6 @@ #include -#include "../cmStandardIncludes.h" - #if defined(__sun__) && defined(__GNUC__) #define _MSE_INT_H #endif diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index db98a00..726a128 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -11,7 +11,14 @@ ============================================================================*/ #include "cmCursesStringWidget.h" +#include "cmCursesForm.h" #include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmCursesWidget.h" +#include "cmState.h" + +#include +#include inline int ctrl(int z) { diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index c8ca482..2bcf7e6 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -12,8 +12,13 @@ #ifndef cmCursesStringWidget_h #define cmCursesStringWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include + class cmCursesMainForm; /** \class cmCursesStringWidget diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx index 49f2795..ed76e7c 100644 --- a/Source/CursesDialog/cmCursesWidget.cxx +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesWidget.h" +#include + cmCursesWidget::cmCursesWidget(int width, int height, int left, int top) { this->Field = new_field(height, width, top, left, 0, 0); diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index 2ac5bb8..3f438af 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -12,9 +12,12 @@ #ifndef cmCursesWidget_h #define cmCursesWidget_h +#include // IWYU pragma: keep + #include "cmCursesStandardIncludes.h" +#include "cmState.h" -#include "../cmState.h" +#include class cmCursesMainForm; -- cgit v0.12