Commit 945e52c6 authored by Stefano Bonicatti's avatar Stefano Bonicatti

First cleanup round of unused includes

Differential Revision: https://phabricator.kde.org/D879
parent 97a2851e
......@@ -30,6 +30,7 @@
#include <kis_image.h>
#include <QMimeDatabase>
#include <QMimeType>
#include <QCoreApplication>
class DocumentManager::Private
{
......
......@@ -20,6 +20,7 @@
#include <QApplication>
#include <QScrollBar>
#include <QFileInfo>
#include <kactioncollection.h>
......
......@@ -25,6 +25,7 @@
#include <QQmlEngine>
#include <QFileInfo>
#include <QStandardPaths>
#include <QDir>
#include <KoDialog.h>
#include <KoZoomController.h>
......
......@@ -28,6 +28,8 @@
#include "KoDocumentResourceManager.h"
#include "KoShapePaintingContext.h"
#include "KoShapeStroke.h"
#include "KoStrokeConfigWidget.h"
#include "KoCanvasBase.h"
#include <KoColor.h>
#include <klocalizedstring.h>
......
......@@ -23,19 +23,20 @@
#define KOCREATEPATHTOOL_P_H
#include "KoCreatePathTool.h"
#include "KoStrokeConfigWidget.h"
#include "KoPathPoint.h"
#include "KoPathPointData.h"
#include "KoPathPointMergeCommand.h"
#include "KoCanvasBase.h"
#include "KoParameterShape.h"
#include "KoViewConverter.h"
#include "KoShapeManager.h"
#include "KoSnapStrategy.h"
#include "KoToolBase_p.h"
#include <KoViewConverter.h>
#include "math.h"
class KoStrokeConfigWidget;
class KoConverter;
/// Small helper to keep track of a path point and its parent path shape
struct PathConnectionPoint {
PathConnectionPoint()
......
......@@ -20,7 +20,7 @@
#ifndef _KOPENCILTOOL_H_
#define _KOPENCILTOOL_H_
#include <KoToolBase.h>
#include "KoToolBase.h"
class KoPathShape;
class KoShapeStroke;
......
......@@ -21,6 +21,18 @@
*/
#include "KoCanvasControllerWidgetViewport_p.h"
#include <limits.h>
#include <stdlib.h>
#include <QPainter>
#include <QDragEnterEvent>
#include <QMimeData>
#include <KoProperties.h>
#include <FlakeDebug.h>
#include "KoShape.h"
#include "KoShape_p.h"
#include "KoShapeFactoryBase.h" // for the SHAPE mimetypes
......@@ -33,16 +45,9 @@
#include "KoShapePaste.h"
#include "KoShapePaintingContext.h"
#include "KoToolProxy.h"
#include "KoCanvasControllerWidget.h"
#include "KoViewConverter.h"
#include <KoProperties.h>
#include <FlakeDebug.h>
#include <QPainter>
#include <QDragEnterEvent>
#include <limits.h>
#include <stdlib.h>
// ********** Viewport **********
Viewport::Viewport(KoCanvasControllerWidget *parent)
......
......@@ -21,11 +21,12 @@
#ifndef KOCANVASCONTROLLERWIDGETVIEWPORT_P_H
#define KOCANVASCONTROLLERWIDGETVIEWPORT_P_H
#include "KoCanvasControllerWidget.h"
#include <QWidget>
#include <QSize>
#include <QPoint>
class Viewport;
class KoCanvasControllerWidget;
class KoShape;
class Viewport : public QWidget
{
......
......@@ -25,26 +25,14 @@
#ifndef KoCanvasControllerWidget_p_h
#define KoCanvasControllerWidget_p_h
#include "KoCanvasControllerWidget.h"
#include "KoCanvasControllerWidgetViewport_p.h"
#include "KoShape.h"
#include "KoViewConverter.h"
#include "KoCanvasBase.h"
#include "KoCanvasObserverBase.h"
#include "KoCanvasSupervisor.h"
#include "KoToolManager_p.h"
#include <FlakeDebug.h>
#include <QMouseEvent>
#include <QPainter>
#include <QScrollBar>
#include <QEvent>
#include <QDockWidget>
#include <QTimer>
#include <KoConfig.h>
class KoCanvasControllerWidget;
class Viewport;
class KoCanvasBase;
class Q_DECL_HIDDEN KoCanvasControllerWidget::Private
{
public:
......
......@@ -23,7 +23,7 @@
#include <QFont>
#include "KoGenericRegistry.h"
#include "KoDockFactoryBase.h"
#include <KoDockFactoryBase.h>
#include "kritaflake_export.h"
......
......@@ -22,6 +22,7 @@
#include <QGlobalStatic>
#include "KoFilterEffect.h"
#include "KoFilterEffectFactoryBase.h"
#include <KoPluginLoader.h>
#include <FlakeDebug.h>
......
......@@ -27,6 +27,7 @@
class KoXmlElement;
class KoFilterEffectLoadingContext;
class KoFilterEffect;
class KRITAFLAKE_EXPORT KoFilterEffectRegistry : public KoGenericRegistry<KoFilterEffectFactoryBase*>
{
......
......@@ -21,9 +21,8 @@
#define KO_GRADIENT_HELPER_H
#include <kritaflake_export.h>
#include <QBrush>
class QGradient;
#include <QGradient>
namespace KoGradientHelper
{
......
......@@ -23,14 +23,16 @@
#include "kritaflake_export.h"
#include <KoXmlReaderForward.h>
#include <QColor>
#include <QWidget>
#include <QtGlobal>
class QPainter;
class QRectF;
class KoViewConverter;
class KoXmlWriter;
class KToggleAction;
class QColor;
class QWidget;
/**
* This class stores application-data for display-grids.
......
......@@ -23,7 +23,7 @@
#include "kritaflake_export.h"
#include <QList>
#include <Qt>
#include <QtGlobal>
#include "KoXmlReaderForward.h"
class QPainter;
......
......@@ -28,6 +28,8 @@
#include <KoGenStyle.h>
#include <KoXmlNS.h>
#include <KoUnit.h>
#include <KoOdfStylesReader.h>
#include <KoXmlReader.h>
#include <FlakeDebug.h>
......
......@@ -22,6 +22,7 @@
#include <QGlobalStatic>
#include <KoPluginLoader.h>
#include "KoInputDeviceHandler.h"
Q_GLOBAL_STATIC(KoInputDeviceHandlerRegistry, s_instance)
......
......@@ -19,11 +19,14 @@
#include "KoMarkerCollection.h"
#include <QFile>
#include "KoMarker.h"
#include "KoMarkerSharedLoadingData.h"
#include <KoXmlReader.h>
#include <KoShapeLoadingContext.h>
#include <KoOdfLoadingContext.h>
#include <KoOdfStylesReader.h>
#include <KoOdfReadStore.h>
#include <QStandardPaths>
#include <FlakeDebug.h>
......
......@@ -29,6 +29,7 @@
#include <KoGenStyles.h>
#include <KoOdfLoadingContext.h>
#include <KoStyleStack.h>
#include <KoOdfStylesReader.h>
#include <QPainter>
#include <QColor>
......
......@@ -25,6 +25,7 @@
#include "KoDocumentResourceManager.h"
#include "KoShapeLoadingContext.h"
#include <KoIcon.h>
#include "KoInsets.h"
#include <klocalizedstring.h>
......
......@@ -31,6 +31,7 @@
#include <KoOdfStylesReader.h>
#include <KoUnit.h>
#include <KoViewConverter.h>
#include <KoXmlReader.h>
#include <FlakeDebug.h>
......
......@@ -21,8 +21,6 @@
#ifndef KO_RESOURCEMANAGER_P_H
#define KO_RESOURCEMANAGER_P_H
#include <QList>
#include <QVariant>
#include <QSizeF>
#include <QHash>
......@@ -30,6 +28,7 @@
#include <KoUnit.h>
class KoShape;
class QVariant;
class KoResourceManager
{
......
......@@ -31,9 +31,6 @@
#include <QMetaType>
#include <KoXmlReaderForward.h>
#include <KoShapeBackground.h>
//#include <KoSnapData.h>
#include "kritaflake_export.h"
......@@ -59,6 +56,7 @@ class KoShapePaintingContext;
class KoShapeAnchor;
class KoBorder;
struct KoInsets;
class KoShapeBackground;
/**
......
......@@ -22,6 +22,7 @@
#include "KoShapeBasedDocumentBase.h"
#include "KoDocumentResourceManager.h"
#include "KoShapeRegistry.h"
#include "KoShapeFactoryBase.h"
#include <kconfig.h>
#include <kconfiggroup.h>
......
......@@ -20,8 +20,6 @@
#ifndef KOSHAPECONFIGWIDGETBASE_H
#define KOSHAPECONFIGWIDGETBASE_H
#include "KoCanvasResourceManager.h"
#include <QWidget>
#include "kritaflake_export.h"
......@@ -29,6 +27,7 @@
class KoShape;
class KUndo2Command;
class KoUnit;
class KoCanvasResourceManager;
/**
* Base widget for shape-configuration panels.
......
......@@ -23,6 +23,7 @@
#include "KoShapeStrokeModel.h"
#include "KoShapeContainerDefaultModel.h"
#include "KoShapeSavingContext.h"
#include "KoViewConverter.h"
#include <QPointF>
#include <QPainter>
......
......@@ -21,7 +21,6 @@
#define KOSHAPECONTAINER_H
#include "KoShape.h"
#include "KoViewConverter.h"
#include <QList>
......@@ -30,6 +29,7 @@
class QPainter;
class KoShapeContainerModel;
class KoShapeContainerPrivate;
class KoViewConverter;
/**
* This is the base class that all Flake group-shapes are based on.
......
......@@ -23,7 +23,6 @@
#define KOSHAPEFACTORYBASE_H
#include <QObject>
#include <QStringList>
#include <QString>
#include <QList>
......@@ -36,6 +35,7 @@ class KoProperties;
class KoShapeConfigWidgetBase;
class KoShapeLoadingContext;
class KoDocumentResourceManager;
class QStringList;
#define SHAPETEMPLATE_MIMETYPE "application/x-flake-shapetemplate"
#define SHAPEID_MIMETYPE "application/x-flake-shapeId"
......
......@@ -18,6 +18,9 @@
*/
#include "KoShapeLayer.h"
#include <QRectF>
#include "SimpleShapeContainerModel.h"
#include "KoShapeSavingContext.h"
#include "KoShapeLoadingContext.h"
......
......@@ -24,7 +24,6 @@
#include <QSet>
#include <QString>
#include <QVariant>
#include <QPair>
#include "kritaflake_export.h"
......@@ -38,6 +37,8 @@ class KoImageCollection;
class KoSharedLoadingData;
class KoDocumentResourceManager;
class KoSectionModel;
class QVariant;
class QObject;
/**
* Context passed to shapes during loading.
......
......@@ -42,6 +42,7 @@
#include <KoRTree.h>
#include "KoClipPath.h"
#include "KoShapePaintingContext.h"
#include "KoViewConverter.h"
#include <QPainter>
#include <QTimer>
......
......@@ -22,30 +22,18 @@
#ifndef KoShapeManager_p_h
#define KoShapeManager_p_h
#include "KoShapeManager.h"
#include "KoSelection.h"
#include "KoPointerEvent.h"
#include "KoShape.h"
#include "KoShape_p.h"
#include "KoCanvasBase.h"
#include "KoShapeContainer.h"
#include "KoShapeStrokeModel.h"
#include "KoShapeGroup.h"
#include "KoToolProxy.h"
#include "KoShapeManagerPaintingStrategy.h"
#include "KoShapeShadow.h"
#include "KoShapeLayer.h"
#include "KoFilterEffect.h"
#include "KoFilterEffectStack.h"
#include "KoFilterEffectRenderContext.h"
#include "KoShapeBackground.h"
#include <KoRTree.h>
#include "KoClipPath.h"
#include "KoShapePaintingContext.h"
#include <QPainter>
#include <QTimer>
#include <FlakeDebug.h>
class KoShapeManager;
class KoCanvasBase;
class KoShapeGroup;
class KoShapePaintingContext;
class QPainter;
class Q_DECL_HIDDEN KoShapeManager::Private
{
......
......@@ -20,10 +20,6 @@
#ifndef KOSHAPEPAINTINGCONTEXT_H
#define KOSHAPEPAINTINGCONTEXT_H
#include <QSet>
#include <QString>
#include <QVariant>
#include "kritaflake_export.h"
class KoCanvasBase;
......
......@@ -26,6 +26,7 @@
#include <KoOdfLoadingContext.h>
#include <KoOdfReadStore.h>
#include <KoXmlReader.h>
#include "KoCanvasBase.h"
#include "KoShapeController.h"
......@@ -38,6 +39,7 @@
#include "KoCanvasController.h"
#include "KoDocumentResourceManager.h"
#include "commands/KoShapeCreateCommand.h"
#include "KoViewConverter.h"
class Q_DECL_HIDDEN KoShapePaste::Private
{
......
......@@ -23,6 +23,7 @@
#include <KoGenericRegistry.h>
#include <KoShapeFactoryBase.h>
#include <KoXmlReaderForward.h>
#include "kritaflake_export.h"
......
......@@ -41,6 +41,7 @@
#include "KoShapeSavingContext.h"
#include "KoPathShape.h"
#include "KoMarkerData.h"
#include "KoInsets.h"
class Q_DECL_HIDDEN KoShapeStroke::Private
......
......@@ -24,7 +24,6 @@
#ifndef KOSHAPESTROKE_H
#define KOSHAPESTROKE_H
#include "KoInsets.h"
#include "KoShapeStrokeModel.h"
#include "kritaflake_export.h"
......@@ -37,6 +36,7 @@ class KoShape;
class QPainter;
class QBrush;
class KoViewConverter;
struct KoInsets;
/**
* A border for shapes that draws a single line around the object.
......
......@@ -26,9 +26,8 @@
#include <QPaintDevice>
#include <QTransform>
#include <KoCanvasBase.h>
class KoBorder;
class KoShapeManager;
class KoShapePrivate
......
......@@ -20,9 +20,10 @@
#ifndef KOSNAPDATA_H
#define KOSNAPDATA_H
#include <KoPathSegment.h>
#include <kritaflake_export.h>
#include "KoPathSegment.h"
/**
* This class is used to provide additional data to the snap guide.
*
......
......@@ -25,18 +25,14 @@
#include "KoCanvasResourceManager.h"
#include "KoCanvasBase.h"
#include "KoShapeController.h"
#include <QMap>
#include <QHash>
#include <QWidget>
#include <QString>
#include <QSet>
#include <QPointer>
#include <string.h> // for the qt version check
class QWidget;
class QAction;
class KoToolBase;
class KoCanvasBase;
class KoToolBasePrivate
{
......
......@@ -41,6 +41,7 @@
#include "tools/KoZoomTool.h"
#include "tools/KoPanTool.h"
#include "kis_action_registry.h"
#include "KoToolFactoryBase.h"
// Qt + kde
#include <QWidget>
......
......@@ -22,7 +22,6 @@
#include <QList>
#include <QObject>
#include <QString>
#include <QTimer>
#include <QHash>
#include <QKeySequence>
......
......@@ -20,6 +20,19 @@
#include "KoToolProxy.h"
#include "KoToolProxy_p.h"
#include <QMimeData>
#include <QUrl>
#include <QTimer>
#include <QApplication>
#include <QTouchEvent>
#include <QClipboard>
#include <kundo2command.h>
#include <KoProperties.h>
#include <FlakeDebug.h>
#include <klocalizedstring.h>
#include "KoToolBase.h"
#include "KoPointerEvent.h"
#include "KoInputDevice.h"
......@@ -34,20 +47,9 @@
#include "KoShapeRegistry.h"
#include "KoShapeController.h"
#include "KoOdf.h"
#include "KoViewConverter.h"
#include "KoShapeFactoryBase.h"
#include <kundo2command.h>
#include <KoProperties.h>
#include <FlakeDebug.h>
#include <klocalizedstring.h>
#include <QUrl>
#include <QTimer>
#include <QApplication>
#include <QTouchEvent>
#include <QClipboard>
#include "FlakeDebug.h"
KoToolProxyPrivate::KoToolProxyPrivate(KoToolProxy *p)
: activeTool(0),
......
......@@ -22,9 +22,10 @@
#define KO_TOOL_REGISTRY_H_
#include "KoGenericRegistry.h"
#include <KoToolFactoryBase.h>
#include "kritaflake_export.h"
class KoToolFactoryBase;
/**
* This singleton class keeps a register of all available flake tools,
* or rather, of the factories that the KoToolBox (and KoToolManager) will use
......
......@@ -21,6 +21,7 @@
#include "KoPathCombineCommand.h"
#include "KoShapeBasedDocumentBase.h"
#include "KoShapeContainer.h"
#include "KoPathShape.h"
#include <klocalizedstring.h>