From 4147337715def44c528d0dd2439019a86c904c41 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sat, 5 Mar 2022 03:44:45 +0100 Subject: [PATCH] [Gui] Python and Property: remove unused includes --- src/Gui/PropertyPage.cpp | 5 +++-- src/Gui/PropertyView.cpp | 26 +++++++------------------- src/Gui/PropertyView.h | 5 +---- src/Gui/PythonConsole.cpp | 3 --- src/Gui/PythonConsole.h | 2 -- src/Gui/PythonConsolePy.cpp | 10 ---------- src/Gui/PythonDebugger.cpp | 19 +++++++++---------- src/Gui/PythonDebugger.h | 3 +-- src/Gui/PythonEditor.cpp | 10 +++------- src/Gui/PythonEditor.h | 5 ++--- src/Gui/PythonWorkbenchPyImp.cpp | 4 +--- src/Gui/PythonWrapper.cpp | 7 +++---- src/Gui/PythonWrapper.h | 3 +-- 13 files changed, 31 insertions(+), 71 deletions(-) diff --git a/src/Gui/PropertyPage.cpp b/src/Gui/PropertyPage.cpp index 29dcc13c42..63e9ecaa33 100644 --- a/src/Gui/PropertyPage.cpp +++ b/src/Gui/PropertyPage.cpp @@ -20,16 +20,17 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ # include #endif +#include + #include "PropertyPage.h" #include "PrefWidgets.h" #include "UiLoader.h" -#include + using namespace Gui::Dialog; diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index e12f2bdbc7..24ceaefafc 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -20,39 +20,27 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include # include +# include # include -# include #endif - -/// Here the FreeCAD includes sorted by Base,App,Gui...... -#include -#include -#include -#include -#include #include -#include -#include +#include #include "PropertyView.h" #include "Application.h" -#include "MainWindow.h" #include "Document.h" -#include "BitmapFactory.h" -#include "ViewProvider.h" -#include "ViewProviderDocumentObject.h" +#include "MainWindow.h" #include "Tree.h" #include "ViewParams.h" - +#include "ViewProvider.h" +#include "ViewProviderDocumentObject.h" #include "propertyeditor/PropertyEditor.h" + using namespace std; using namespace Gui; using namespace Gui::DockWnd; @@ -76,7 +64,7 @@ static ParameterGrp::handle _GetParam() { * in two tabs. */ PropertyView::PropertyView(QWidget *parent) - : QWidget(parent),SelectionObserver(false,0) + : QWidget(parent), SelectionObserver(false, 0) { QGridLayout* pLayout = new QGridLayout( this ); pLayout->setSpacing(0); diff --git a/src/Gui/PropertyView.h b/src/Gui/PropertyView.h index c020655ade..41bfec50ba 100644 --- a/src/Gui/PropertyView.h +++ b/src/Gui/PropertyView.h @@ -20,15 +20,12 @@ * * ***************************************************************************/ - - #ifndef GUI_DOCKWND_PROPERTYVIEW_H #define GUI_DOCKWND_PROPERTYVIEW_H - #include "DockWindow.h" #include "Selection.h" -#include + class QPixmap; class QTabWidget; diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index fb6b7896e2..979e0ff3ab 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ # include @@ -37,8 +36,6 @@ #endif #include -#include -#include #include "PythonConsole.h" #include "PythonConsolePy.h" diff --git a/src/Gui/PythonConsole.h b/src/Gui/PythonConsole.h index d5e07eb0de..31fef0c336 100644 --- a/src/Gui/PythonConsole.h +++ b/src/Gui/PythonConsole.h @@ -20,13 +20,11 @@ * * ***************************************************************************/ - #ifndef GUI_PYTHONCONSOLE_H #define GUI_PYTHONCONSOLE_H #include "PythonEditor.h" -#include class QPlainTextEdit; class QPushButton; diff --git a/src/Gui/PythonConsolePy.cpp b/src/Gui/PythonConsolePy.cpp index 87813be3c5..7273c390e2 100644 --- a/src/Gui/PythonConsolePy.cpp +++ b/src/Gui/PythonConsolePy.cpp @@ -20,21 +20,11 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#ifndef _PreComp_ -# include -# include -# include -# include -#endif #include "PythonConsolePy.h" #include "PythonConsole.h" -#include "MainWindow.h" -#include -#include using namespace Gui; diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index 403fd0ae88..f3bda7865f 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -20,22 +20,21 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ -# include # include -# include -# include +# include #endif -#include "PythonDebugger.h" -#include "MainWindow.h" -#include "EditorView.h" -#include "PythonEditor.h" -#include "BitmapFactory.h" -#include #include +#include + +#include "PythonDebugger.h" +#include "BitmapFactory.h" +#include "EditorView.h" +#include "MainWindow.h" +#include "PythonEditor.h" + using namespace Gui; diff --git a/src/Gui/PythonDebugger.h b/src/Gui/PythonDebugger.h index 8979c22c7a..042c47bc05 100644 --- a/src/Gui/PythonDebugger.h +++ b/src/Gui/PythonDebugger.h @@ -20,15 +20,14 @@ * * ***************************************************************************/ - #ifndef GUI_PYTHONDEBUG_H #define GUI_PYTHONDEBUG_H #include #include -#include #include + namespace Gui { class Breakpoint diff --git a/src/Gui/PythonEditor.cpp b/src/Gui/PythonEditor.cpp index b144b7e109..8c34fd62de 100644 --- a/src/Gui/PythonEditor.cpp +++ b/src/Gui/PythonEditor.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ # include @@ -30,17 +29,14 @@ # include #endif +#include + #include "PythonEditor.h" -#include "PythonDebugger.h" #include "Application.h" #include "BitmapFactory.h" #include "Macro.h" -#include "FileDialog.h" -#include "DlgEditorImp.h" +#include "PythonDebugger.h" -#include -#include -#include using namespace Gui; diff --git a/src/Gui/PythonEditor.h b/src/Gui/PythonEditor.h index fbb05ea42a..6ffc9e46d6 100644 --- a/src/Gui/PythonEditor.h +++ b/src/Gui/PythonEditor.h @@ -20,13 +20,12 @@ * * ***************************************************************************/ - #ifndef GUI_PYTHONEDITOR_H #define GUI_PYTHONEDITOR_H -#include "Window.h" -#include "TextEdit.h" #include "SyntaxHighlighter.h" +#include "TextEdit.h" + namespace Gui { diff --git a/src/Gui/PythonWorkbenchPyImp.cpp b/src/Gui/PythonWorkbenchPyImp.cpp index 6a4b5d7a3f..5c8d93dca3 100644 --- a/src/Gui/PythonWorkbenchPyImp.cpp +++ b/src/Gui/PythonWorkbenchPyImp.cpp @@ -20,15 +20,13 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#include "Workbench.h" - // inclusion of the generated files (generated out of PythonWorkbenchPy.xml) #include "PythonWorkbenchPy.h" #include "PythonWorkbenchPy.cpp" + using namespace Gui; /** @class PythonWorkbenchPy diff --git a/src/Gui/PythonWrapper.cpp b/src/Gui/PythonWrapper.cpp index e7091a6ef0..ec9fd2263e 100644 --- a/src/Gui/PythonWrapper.cpp +++ b/src/Gui/PythonWrapper.cpp @@ -20,15 +20,14 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ -# include # include -# include -# include # include +# include +# include #endif + #include // Uncomment this block to remove PySide C++ support and switch to its Python interface diff --git a/src/Gui/PythonWrapper.h b/src/Gui/PythonWrapper.h index d12e81df15..786de22eeb 100644 --- a/src/Gui/PythonWrapper.h +++ b/src/Gui/PythonWrapper.h @@ -25,11 +25,10 @@ #define GUI_PYTHONWRAPPER_H #include - #include -#include #include + QT_BEGIN_NAMESPACE class QDir; QT_END_NAMESPACE