Refactoring patches
Yuriy Skalko
yuriy.skalko at gmail.com
Tue Oct 13 07:09:06 UTC 2020
> Yes. We'll deal with the rest later.
> Pavel
Done at 2a594d3.
The .cpp changing part (for future applying) is in attached patch.
Yuriy
-------------- next part --------------
From 87bce97a51b505b6447c50e07574de04964927c2 Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Mon, 12 Oct 2020 15:30:07 +0300
Subject: [PATCH] Remove duplicate and unused header includes
---
src/frontends/qt/GuiCharacter.cpp | 1 -
src/frontends/qt/GuiCitation.cpp | 4 ----
src/frontends/qt/GuiCounter.cpp | 2 --
src/frontends/qt/GuiDocument.cpp | 1 -
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 | 2 --
src/frontends/qt/Menus.cpp | 1 -
src/insets/InsetLayout.cpp | 1 -
src/insets/InsetPhantom.cpp | 1 -
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/MathRow.cpp | 2 --
src/support/lassert.cpp | 5 +++--
27 files changed, 3 insertions(+), 39 deletions(-)
diff --git a/src/frontends/qt/GuiCharacter.cpp b/src/frontends/qt/GuiCharacter.cpp
index d1d4336fc2..cfa481c832 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 951bad8612..d7e5ae0199 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 db081a46c5..d7685bc7bb 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 d776ad5e3b..42b1932ac0 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -27,7 +27,6 @@
#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 eb71aad4d1..3a4ab2c91e 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 7800bad2d4..a59ac3953f 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 6851994701..16979138d8 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 6c87850d40..a70a809dfa 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 973ec823c0..1aff3afd3c 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 093efe0e55..50760ed13a 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 1df93d86ab..ce28491b34 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 793ee1efd2..e9ee840fd8 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 919c9e1bc7..748b694725 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -73,9 +73,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"
diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index 5bf058f8b0..03fed5cda6 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 "CutAndPaste.h"
#include "Floating.h"
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index d758a1c3a4..51456c5eca 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 37367add2c..24ad8e9118 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/mathed/InsetMathEnv.cpp b/src/mathed/InsetMathEnv.cpp
index 2eea5ac418..dd2c391681 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 537870fd91..f0242c0bdb 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 ebf8843d79..93c86c781f 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -38,7 +38,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 a152222cb6..294e24b073 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 9d88b1337b..ada0400f18 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 5a35415786..593da68d97 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 e4123a5655..565a71fb18 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 2ea3b71b50..37445da1d8 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 2a4899a258..19d45d2069 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/MathRow.cpp b/src/mathed/MathRow.cpp
index be61c8a39c..16b64c6b7f 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 dcf8acd011..3e594153cb 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
--
2.28.0.windows.1
More information about the lyx-devel
mailing list