[LyX/master] Remove duplicate and unused header includes in .cpp files

Yuriy Skalko yuriy.skalko at gmail.com
Mon Oct 19 14:33:14 UTC 2020


commit d25c10ed81e63263392fcd72727ea3907e61c8e4
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date:   Mon Oct 12 15:30:07 2020 +0300

    Remove duplicate and unused header includes in .cpp files
---
 src/Paragraph.cpp                     |    5 -----
 src/frontends/qt/Dialog.cpp           |    7 -------
 src/frontends/qt/GuiApplication.cpp   |    2 --
 src/frontends/qt/GuiCharacter.cpp     |    1 -
 src/frontends/qt/GuiCitation.cpp      |    4 ----
 src/frontends/qt/GuiCounter.cpp       |    2 --
 src/frontends/qt/GuiDocument.cpp      |    3 ---
 src/frontends/qt/GuiExternal.cpp      |    1 -
 src/frontends/qt/GuiIndex.cpp         |    2 --
 src/frontends/qt/GuiLog.cpp           |    1 -
 src/frontends/qt/GuiNote.cpp          |    2 --
 src/frontends/qt/GuiPhantom.cpp       |    2 --
 src/frontends/qt/GuiPrefs.cpp         |    2 --
 src/frontends/qt/GuiTabular.cpp       |    2 --
 src/frontends/qt/GuiToc.cpp           |    1 -
 src/frontends/qt/GuiView.cpp          |   12 ------------
 src/frontends/qt/Menus.cpp            |    1 -
 src/insets/InsetLayout.cpp            |    1 -
 src/insets/InsetPhantom.cpp           |    1 -
 src/lyxfind.cpp                       |    2 --
 src/mathed/InsetMathEnv.cpp           |    1 -
 src/mathed/InsetMathExInt.cpp         |    1 -
 src/mathed/InsetMathHull.cpp          |    1 -
 src/mathed/InsetMathMacroTemplate.cpp |    1 -
 src/mathed/InsetMathNest.cpp          |    1 -
 src/mathed/InsetMathNumber.cpp        |    1 -
 src/mathed/InsetMathTabular.cpp       |    1 -
 src/mathed/InsetMathXArrow.cpp        |    1 -
 src/mathed/MacroTable.cpp             |    1 -
 src/mathed/MathParser.cpp             |    1 -
 src/mathed/MathRow.cpp                |    2 --
 src/support/lassert.cpp               |    5 +++--
 32 files changed, 3 insertions(+), 68 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index d69fa55..f3dc50f 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -39,9 +39,7 @@
 #include "output_docbook.h"
 #include "ParagraphParameters.h"
 #include "SpellChecker.h"
-#include "xml.h"
 #include "texstream.h"
-#include "TextClass.h"
 #include "TexRow.h"
 #include "Text.h"
 #include "WordLangTuple.h"
@@ -58,13 +56,10 @@
 
 #include "support/debug.h"
 #include "support/docstring_list.h"
-#include "support/ExceptionMessage.h"
 #include "support/gettext.h"
 #include "support/lassert.h"
-#include "support/Length.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
-#include "output_docbook.h"
 
 #include <algorithm>
 #include <atomic>
diff --git a/src/frontends/qt/Dialog.cpp b/src/frontends/qt/Dialog.cpp
index b09163b..7590a54 100644
--- a/src/frontends/qt/Dialog.cpp
+++ b/src/frontends/qt/Dialog.cpp
@@ -23,18 +23,11 @@
 #include "FuncStatus.h"
 #include "LyX.h"
 
-#include "insets/Inset.h"
-
 #include "support/debug.h"
 #include "support/gettext.h"
 #include "support/lassert.h"
 
-#include <QLabel>
-#include <QLineEdit>
-#include <QList>
 #include <QSettings>
-#include <QString>
-#include <QValidator>
 
 #include <string>
 
diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 4d88135..2c87ad1 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -16,9 +16,7 @@
 
 #include "ToolTipFormatter.h"
 #include "ColorCache.h"
-#include "ColorSet.h"
 #include "GuiClipboard.h"
-#include "GuiKeySymbol.h"
 #include "GuiSelection.h"
 #include "GuiView.h"
 #include "Menus.h"
diff --git a/src/frontends/qt/GuiCharacter.cpp b/src/frontends/qt/GuiCharacter.cpp
index 3de8338..96e8d73 100644
--- a/src/frontends/qt/GuiCharacter.cpp
+++ b/src/frontends/qt/GuiCharacter.cpp
@@ -18,7 +18,6 @@
 #include "GuiApplication.h"
 #include "qt_helpers.h"
 
-#include "Font.h"
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "BufferView.h"
diff --git a/src/frontends/qt/GuiCitation.cpp b/src/frontends/qt/GuiCitation.cpp
index 951bad8..d7e5ae0 100644
--- a/src/frontends/qt/GuiCitation.cpp
+++ b/src/frontends/qt/GuiCitation.cpp
@@ -22,7 +22,6 @@
 
 #include "Buffer.h"
 #include "BufferView.h"
-#include "BiblioInfo.h"
 #include "BufferParams.h"
 #include "TextClass.h"
 #include "FuncRequest.h"
@@ -42,9 +41,6 @@
 #include <QStandardItemModel>
 #include <QVariant>
 
-#include <vector>
-#include <string>
-
 #undef KeyPress
 
 #include "support/regex.h"
diff --git a/src/frontends/qt/GuiCounter.cpp b/src/frontends/qt/GuiCounter.cpp
index db081a4..d7685bc 100644
--- a/src/frontends/qt/GuiCounter.cpp
+++ b/src/frontends/qt/GuiCounter.cpp
@@ -25,8 +25,6 @@
 #include "support/gettext.h"
 #include "support/lstrings.h"
 
-#include "qt_helpers.h"
-
 #include <map>
 //#include <vector>
 
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 9d3643d..883b283 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -19,15 +19,12 @@
 #include "GuiIndices.h"
 #include "GuiSelectionManager.h"
 #include "LaTeXHighlighter.h"
-#include "LengthCombo.h"
-#include "PanelStack.h"
 #include "Validator.h"
 
 #include "LayoutFile.h"
 #include "BranchList.h"
 #include "buffer_funcs.h"
 #include "Buffer.h"
-#include "BufferParams.h"
 #include "BufferView.h"
 #include "CiteEnginesList.h"
 #include "Color.h"
diff --git a/src/frontends/qt/GuiExternal.cpp b/src/frontends/qt/GuiExternal.cpp
index eb71aad..3a4ab2c 100644
--- a/src/frontends/qt/GuiExternal.cpp
+++ b/src/frontends/qt/GuiExternal.cpp
@@ -21,7 +21,6 @@
 
 #include "insets/ExternalSupport.h"
 #include "insets/ExternalTemplate.h"
-#include "insets/InsetExternal.h"
 
 #include "graphics/epstools.h"
 #include "graphics/GraphicsCache.h"
diff --git a/src/frontends/qt/GuiIndex.cpp b/src/frontends/qt/GuiIndex.cpp
index 7800bad..a59ac39 100644
--- a/src/frontends/qt/GuiIndex.cpp
+++ b/src/frontends/qt/GuiIndex.cpp
@@ -21,8 +21,6 @@
 #include "FuncRequest.h"
 #include "IndicesList.h"
 
-#include "insets/InsetIndex.h"
-
 #include <QPushButton>
 
 using namespace std;
diff --git a/src/frontends/qt/GuiLog.cpp b/src/frontends/qt/GuiLog.cpp
index 6851994..1697913 100644
--- a/src/frontends/qt/GuiLog.cpp
+++ b/src/frontends/qt/GuiLog.cpp
@@ -21,7 +21,6 @@
 #include "frontends/Clipboard.h"
 
 #include "support/docstring.h"
-#include "support/FileName.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
 
diff --git a/src/frontends/qt/GuiNote.cpp b/src/frontends/qt/GuiNote.cpp
index 6c87850..a70a809 100644
--- a/src/frontends/qt/GuiNote.cpp
+++ b/src/frontends/qt/GuiNote.cpp
@@ -15,8 +15,6 @@
 #include "FuncRequest.h"
 #include "support/gettext.h"
 
-#include "insets/InsetNote.h"
-
 using namespace std;
 
 namespace lyx {
diff --git a/src/frontends/qt/GuiPhantom.cpp b/src/frontends/qt/GuiPhantom.cpp
index 973ec82..1aff3af 100644
--- a/src/frontends/qt/GuiPhantom.cpp
+++ b/src/frontends/qt/GuiPhantom.cpp
@@ -14,8 +14,6 @@
 #include "FuncRequest.h"
 #include "support/gettext.h"
 
-#include "insets/InsetPhantom.h"
-
 using namespace std;
 
 namespace lyx {
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 093efe0..50760ed 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -19,7 +19,6 @@
 #include "GuiFontExample.h"
 #include "GuiFontLoader.h"
 #include "GuiKeySymbol.h"
-#include "GuiLyXFiles.h"
 #include "GuiView.h"
 #include "qt_helpers.h"
 #include "Validator.h"
@@ -31,7 +30,6 @@
 #include "ConverterCache.h"
 #include "FontEnums.h"
 #include "FuncRequest.h"
-#include "KeyMap.h"
 #include "KeySequence.h"
 #include "Language.h"
 #include "LyXAction.h"
diff --git a/src/frontends/qt/GuiTabular.cpp b/src/frontends/qt/GuiTabular.cpp
index 1df93d8..ce28491 100644
--- a/src/frontends/qt/GuiTabular.cpp
+++ b/src/frontends/qt/GuiTabular.cpp
@@ -31,8 +31,6 @@
 #include "LyX.h"
 #include "LyXRC.h"
 
-#include "insets/InsetTabular.h"
-
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/lstrings.h"
diff --git a/src/frontends/qt/GuiToc.cpp b/src/frontends/qt/GuiToc.cpp
index 793ee1e..e9ee840 100644
--- a/src/frontends/qt/GuiToc.cpp
+++ b/src/frontends/qt/GuiToc.cpp
@@ -14,7 +14,6 @@
 
 #include "GuiToc.h"
 #include "GuiView.h"
-#include "DockView.h"
 #include "TocWidget.h"
 #include "qt_helpers.h"
 
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 919c9e1..d417ffe 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -20,7 +20,6 @@
 #include "FontLoader.h"
 #include "GuiApplication.h"
 #include "GuiClickableLabel.h"
-#include "GuiCommandBuffer.h"
 #include "GuiCompleter.h"
 #include "GuiKeySymbol.h"
 #include "GuiToc.h"
@@ -51,9 +50,7 @@
 #include "Format.h"
 #include "FuncStatus.h"
 #include "FuncRequest.h"
-#include "Intl.h"
 #include "Language.h"
-#include "Layout.h"
 #include "LayoutFile.h"
 #include "Lexer.h"
 #include "LyXAction.h"
@@ -64,7 +61,6 @@
 #include "SpellChecker.h"
 #include "Session.h"
 #include "TexRow.h"
-#include "TextClass.h"
 #include "Text.h"
 #include "Toolbars.h"
 #include "version.h"
@@ -73,9 +69,7 @@
 #include "support/debug.h"
 #include "support/ExceptionMessage.h"
 #include "support/FileName.h"
-#include "support/filetools.h"
 #include "support/gettext.h"
-#include "support/filetools.h"
 #include "support/ForkedCalls.h"
 #include "support/lassert.h"
 #include "support/lstrings.h"
@@ -89,8 +83,6 @@
 #include <QAction>
 #include <QApplication>
 #include <QCloseEvent>
-#include <QDebug>
-#include <QDesktopWidget>
 #include <QDragEnterEvent>
 #include <QDropEvent>
 #include <QFuture>
@@ -105,8 +97,6 @@
 #include <QPainter>
 #include <QPixmap>
 #include <QPoint>
-#include <QPushButton>
-#include <QScrollBar>
 #include <QSettings>
 #include <QShowEvent>
 #include <QSplitter>
@@ -114,9 +104,7 @@
 #include <QStatusBar>
 #include <QSvgRenderer>
 #include <QtConcurrentRun>
-#include <QTime>
 #include <QTimer>
-#include <QToolBar>
 #include <QUrl>
 #include <QWindowStateChangeEvent>
 
diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index afe43c7..b433773 100644
--- a/src/frontends/qt/Menus.cpp
+++ b/src/frontends/qt/Menus.cpp
@@ -29,7 +29,6 @@
 #include "Buffer.h"
 #include "BufferList.h"
 #include "BufferParams.h"
-#include "BufferView.h"
 #include "Converter.h"
 #include "Cursor.h"
 #include "CutAndPaste.h"
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index 19e4aa6..a675cb5 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
@@ -15,7 +15,6 @@
 #include "InsetLayout.h"
 
 #include "ColorSet.h"
-#include "Layout.h"
 #include "Lexer.h"
 #include "TextClass.h"
 
diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp
index 37367ad..24ad8e9 100644
--- a/src/insets/InsetPhantom.cpp
+++ b/src/insets/InsetPhantom.cpp
@@ -15,7 +15,6 @@
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "BufferView.h"
-#include "BufferParams.h"
 #include "Cursor.h"
 #include "Dimension.h"
 #include "DispatchResult.h"
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 5b4bd3a..e12d4d2 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -38,13 +38,11 @@
 #include "frontends/alert.h"
 
 #include "mathed/InsetMath.h"
-#include "mathed/InsetMathGrid.h"
 #include "mathed/InsetMathHull.h"
 #include "mathed/MathData.h"
 #include "mathed/MathStream.h"
 #include "mathed/MathSupport.h"
 
-#include "support/convert.h"
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/FileName.h"
diff --git a/src/mathed/InsetMathEnv.cpp b/src/mathed/InsetMathEnv.cpp
index 2eea5ac..dd2c391 100644
--- a/src/mathed/InsetMathEnv.cpp
+++ b/src/mathed/InsetMathEnv.cpp
@@ -14,7 +14,6 @@
 
 #include "MathData.h"
 #include "MathStream.h"
-#include "MathStream.h"
 
 #include "MetricsInfo.h"
 
diff --git a/src/mathed/InsetMathExInt.cpp b/src/mathed/InsetMathExInt.cpp
index 537870f..f0242c0 100644
--- a/src/mathed/InsetMathExInt.cpp
+++ b/src/mathed/InsetMathExInt.cpp
@@ -15,7 +15,6 @@
 #include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
-#include "MathStream.h"
 #include "InsetMathSymbol.h"
 
 #include "support/debug.h"
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 70d057c..4125bf6 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -39,7 +39,6 @@
 #include "InsetMathMacro.h"
 #include "InsetMathMacroTemplate.h"
 #include "MetricsInfo.h"
-#include "xml.h"
 #include "Paragraph.h"
 #include "ParIterator.h"
 #include "xml.h"
diff --git a/src/mathed/InsetMathMacroTemplate.cpp b/src/mathed/InsetMathMacroTemplate.cpp
index a152222..294e24b 100644
--- a/src/mathed/InsetMathMacroTemplate.cpp
+++ b/src/mathed/InsetMathMacroTemplate.cpp
@@ -22,7 +22,6 @@
 #include "MathStream.h"
 #include "MathParser.h"
 #include "MathSupport.h"
-#include "InsetMathMacroArgument.h"
 
 #include "Buffer.h"
 #include "BufferView.h"
diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index 9d88b13..ada0400 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -30,7 +30,6 @@
 #include "InsetMathUnknown.h"
 #include "MathAutoCorrect.h"
 #include "MathCompletionList.h"
-#include "MathData.h"
 #include "MathFactory.h"
 #include "InsetMathMacro.h"
 #include "InsetMathMacroArgument.h"
diff --git a/src/mathed/InsetMathNumber.cpp b/src/mathed/InsetMathNumber.cpp
index 5a35415..593da68 100644
--- a/src/mathed/InsetMathNumber.cpp
+++ b/src/mathed/InsetMathNumber.cpp
@@ -12,7 +12,6 @@
 
 #include "InsetMathNumber.h"
 #include "MathStream.h"
-#include "MathStream.h"
 #include "MathSupport.h"
 
 #include "MetricsInfo.h"
diff --git a/src/mathed/InsetMathTabular.cpp b/src/mathed/InsetMathTabular.cpp
index e4123a5..565a71f 100644
--- a/src/mathed/InsetMathTabular.cpp
+++ b/src/mathed/InsetMathTabular.cpp
@@ -14,7 +14,6 @@
 
 #include "MathData.h"
 #include "MathStream.h"
-#include "MathStream.h"
 
 #include "MetricsInfo.h"
 
diff --git a/src/mathed/InsetMathXArrow.cpp b/src/mathed/InsetMathXArrow.cpp
index 2ea3b71..37445da 100644
--- a/src/mathed/InsetMathXArrow.cpp
+++ b/src/mathed/InsetMathXArrow.cpp
@@ -16,7 +16,6 @@
 
 #include "MathData.h"
 #include "MathStream.h"
-#include "MathStream.h"
 #include "MathSupport.h"
 
 #include "LaTeXFeatures.h"
diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp
index 2a4899a..19d45d2 100644
--- a/src/mathed/MacroTable.cpp
+++ b/src/mathed/MacroTable.cpp
@@ -20,7 +20,6 @@
 #include "InsetMathNest.h"
 
 #include "Buffer.h"
-#include "DocIterator.h"
 #include "InsetList.h"
 #include "Text.h"
 
diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp
index 89c742a..f07b2e6 100644
--- a/src/mathed/MathParser.cpp
+++ b/src/mathed/MathParser.cpp
@@ -77,7 +77,6 @@ following hack as starting point to write some macros:
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/docstream.h"
-#include "support/unique_ptr.h"
 
 #include <sstream>
 
diff --git a/src/mathed/MathRow.cpp b/src/mathed/MathRow.cpp
index be61c8a..16b64c6 100644
--- a/src/mathed/MathRow.cpp
+++ b/src/mathed/MathRow.cpp
@@ -12,8 +12,6 @@
 
 #include "MathRow.h"
 
-#include "InsetMath.h"
-#include "MathClass.h"
 #include "MathData.h"
 #include "MathSupport.h"
 
diff --git a/src/support/lassert.cpp b/src/support/lassert.cpp
index dcf8acd..3e59415 100644
--- a/src/support/lassert.cpp
+++ b/src/support/lassert.cpp
@@ -10,7 +10,8 @@
  */
 
 #include <config.h>
-#include <lassert.h>
+
+#include "support/lassert.h"
 
 #include "support/convert.h"
 #include "support/debug.h"
@@ -21,13 +22,13 @@
 
 #include <boost/assert.hpp>
 
-#include <QString>
 
 #ifdef LYX_CALLSTACK_PRINTING
 #include <cstdio>
 #include <cstdlib>
 #include <execinfo.h>
 #include <cxxabi.h>
+#include <QString>
 #endif
 
 


More information about the lyx-cvs mailing list