Commit ec809d58 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Remove unused/unneeded includes & forward declarations

Summary:
Some people play Sudoku on the train, others play
Gredelbuil (grep, remove, build), i.e. manually cleaning up
includes and forward declarations which are not needed

Done by primitive grepping for Q/K* class names and
* removing any includes whose class does not have instances
  by a quick look in implementations in the same file
* using forward declarations instead of includes for classes
  whe possible, unless a template class (because the latter
  is quite verbose as forward declarations, the include
  nicer to read)
* removing any forward declarations which are not used in the
  same file
(one day a bot/script will steal my game and beat me, o tempores)

WRT effects on dependent code, at least kdevelop will need one or
two adaptions due to changed include visibility. That is done as
part of a similar clean-up patch, which will be either directly
pushed or also passed through review, as you prefer.

Reviewers: #kdevelop, apol

Reviewed By: #kdevelop, apol

Subscribers: apol, kdevelop-devel

Differential Revision: https://phabricator.kde.org/D5071
parent dfd348ed
......@@ -24,8 +24,8 @@
#include <QIcon>
#include <QPixmap>
#include <QTimer>
#include <KParts/PartManager>
#include <KLocalizedString>
#include <KTextEditor/Document>
#include <ktexteditor/movinginterface.h>
......@@ -40,7 +40,6 @@
#include <interfaces/isession.h>
#include "util/debug.h"
#include "breakpoint.h"
#include <KConfigCore/KSharedConfig>
#include <KConfigGroup>
#include <QAction>
#include <QMenu>
......
......@@ -24,8 +24,7 @@
#include <QIcon>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QSplitter>
#include <QVBoxLayout>
#include <QTreeView>
#include <QHeaderView>
#include <QMenu>
......
......@@ -29,10 +29,8 @@
class QAbstractProxyModel;
class QModelIndex;
class QItemSelection;
class QTreeView;
class QMenu;
class QSplitter;
namespace KDevelop {
class IDebugController;
......
......@@ -22,7 +22,6 @@
#define KDEVPLATFORM_FRAMESTACKMODEL_H
#include <QtCore/QModelIndex>
#include <QtCore/QHash>
#include <debugger/debuggerexport.h>
#include <debugger/interfaces/idebugsession.h>
......
......@@ -35,7 +35,6 @@
#include <QApplication>
#include <QClipboard>
#include <QIcon>
#include <QResizeEvent>
#include <QAction>
#include <KStandardAction>
......
......@@ -33,7 +33,6 @@
#include "../breakpoint/breakpoint.h"
#include "../breakpoint/breakpointmodel.h"
class QModelIndex;
namespace KDevelop {
class IDebugSession;
......
......@@ -23,8 +23,6 @@
#include "ivariablecontroller.h"
#include "util/debug.h"
#include <QApplication>
#include <QWidget>
#include <QFileInfo>
......
......@@ -24,7 +24,6 @@
#include <debugger/debuggerexport.h>
#include <QtCore/QObject>
#include <QtCore/QAbstractItemModel>
#include <QUrl>
namespace KDevelop {
......
......@@ -26,8 +26,6 @@
#include "idebugsession.h"
class QString;
namespace KTextEditor {
class Document;
class Cursor;
......
......@@ -24,7 +24,6 @@
#include <QAbstractTableModel>
#include <QVBoxLayout>
#include <QLabel>
#include <QTableView>
#include <QHeaderView>
#include <QAction>
......
......@@ -21,7 +21,6 @@
#include "treeitem.h"
#include <QStringList>
#include <QModelIndex>
#include "debug.h"
......
......@@ -22,9 +22,7 @@
#ifndef KDEVPLATFORM_TREEITEM_H
#define KDEVPLATFORM_TREEITEM_H
#include <QtCore/QList>
#include <QtCore/QVariant>
#include <QtCore/QTimer>
#include <QtCore/QVector>
#include <QIcon>
......
......@@ -21,8 +21,6 @@
#include "treemodel.h"
//#include <QtGui>
#include <iostream>
#include "treeitem.h"
......
......@@ -31,7 +31,6 @@
#include <KTextEditor/TextHintInterface>
#include <KTextEditor/Document>
#include <KTextEditor/View>
#include <KParts/PartManager>
#include "../../interfaces/icore.h"
#include "../../interfaces/idocumentcontroller.h"
......
......@@ -24,8 +24,6 @@
#ifndef KDEVPLATFORM_VARIABLECOLLECTION_H
#define KDEVPLATFORM_VARIABLECOLLECTION_H
#include <QtCore/QAbstractItemModel>
#include <QtCore/QMap>
#include <QtCore/QPointer>
#include <KLocalizedString>
......
......@@ -25,8 +25,6 @@
#include <QCollator>
#include <QSortFilterProxyModel>
class QModelIndex;
namespace KDevelop
{
......
......@@ -24,13 +24,9 @@
#include <QWidget>
#include <QHBoxLayout>
#include <QTreeView>
#include <QApplication>
#include <QEvent>
#include <QStandardItemModel>
#include <QMouseEvent>
#include <QHeaderView>
#include <QLabel>
#include <QPushButton>
#include <QScrollBar>
#include <QSignalMapper>
......
......@@ -26,11 +26,8 @@
#include "../../util/activetooltip.h"
#include "../util/treeview.h"
#include <QPoint>
class QItemSelectionModel;
class QString;
class QResizeEvent;
class QSortFilterProxyModel;
namespace KDevelop
......
......@@ -16,9 +16,10 @@
#include "variablewidget.h"
#include <QApplication>
#include <QAction>
#include <QCursor>
#include <QClipboard>
#include <QKeyEvent>
#include <QContextMenuEvent>
#include <QMenu>
#include <QVBoxLayout>
......
......@@ -16,9 +16,7 @@
#ifndef KDEVPLATFORM_VARIABLEWIDGET_H
#define KDEVPLATFORM_VARIABLEWIDGET_H
#include <QAction>
#include <QSignalMapper>
#include <QTreeView>
#include <debugger/debuggerexport.h>
#include "../util/treeview.h"
......@@ -26,6 +24,8 @@
class KHistoryComboBox;
class QSortFilterProxyModel;
class QAction;
namespace KDevelop
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment