From b01f5684c50dca638ba999097022545e515db485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 26 Feb 2013 08:02:27 +0100 Subject: [PATCH] Remove not needed includes from kwineffect header files Only include what's actually needed in the headers. This causes of course some additional needed includes in some implementation files. --- effects/cube/cubeslide.cpp | 1 + effects/screenedge/screenedgeeffect.cpp | 1 + effects/screenshot/screenshot.cpp | 1 + effects/sheet/sheet.cpp | 2 ++ libkwineffects/kwinanimationeffect.cpp | 1 + libkwineffects/kwineffects.cpp | 2 ++ libkwineffects/kwineffects.h | 2 +- libkwineffects/kwinglcolorcorrection.h | 4 +--- libkwineffects/kwinglcolorcorrection_p.h | 1 + libkwineffects/kwinglobals.h | 2 -- libkwineffects/kwingltexture.h | 1 + libkwineffects/kwingltexture_p.h | 3 +++ libkwineffects/kwinglutils.h | 17 ++++++----------- libkwineffects/kwinxrenderutils.cpp | 2 +- libkwineffects/kwinxrenderutils.h | 17 +++++++++-------- scene_opengl.cpp | 1 + scripting/workspace_wrapper.h | 1 + tests/test_screen_paint_data.cpp | 1 + tests/test_window_paint_data.cpp | 2 ++ 19 files changed, 36 insertions(+), 26 deletions(-) diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index f0459058bf..24d05cf82b 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -23,6 +23,7 @@ along with this program. If not, see . #include "cubeslideconfig.h" #include +#include #include diff --git a/effects/screenedge/screenedgeeffect.cpp b/effects/screenedge/screenedgeeffect.cpp index 25f1d4a4b6..29d23654dd 100644 --- a/effects/screenedge/screenedgeeffect.cpp +++ b/effects/screenedge/screenedgeeffect.cpp @@ -27,6 +27,7 @@ along with this program. If not, see . // Qt #include #include +#include // xcb #ifdef KWIN_HAVE_XRENDER_COMPOSITING #include diff --git a/effects/screenshot/screenshot.cpp b/effects/screenshot/screenshot.cpp index 02f02363b4..1b3354c975 100644 --- a/effects/screenshot/screenshot.cpp +++ b/effects/screenshot/screenshot.cpp @@ -26,6 +26,7 @@ along with this program. If not, see . #include #include #include +#include #include namespace KWin diff --git a/effects/sheet/sheet.cpp b/effects/sheet/sheet.cpp index 2e55ed448b..f3652925b3 100644 --- a/effects/sheet/sheet.cpp +++ b/effects/sheet/sheet.cpp @@ -23,6 +23,8 @@ along with this program. If not, see . #include #include +#include +#include // Effect is based on fade effect by Philip Falkner diff --git a/libkwineffects/kwinanimationeffect.cpp b/libkwineffects/kwinanimationeffect.cpp index f2b55d0508..67480c129d 100644 --- a/libkwineffects/kwinanimationeffect.cpp +++ b/libkwineffects/kwinanimationeffect.cpp @@ -23,6 +23,7 @@ along with this program. If not, see . #include #include +#include namespace KWin { diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index 28b0039939..e481bc6de0 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -32,6 +32,8 @@ along with this program. If not, see . #include #include #include +#include +#include #include #include diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index 7aee5568e5..1f30bd5223 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -29,7 +29,6 @@ along with this program. If not, see . #include #include #include -#include #include #include @@ -48,6 +47,7 @@ class KLibrary; class KConfigGroup; class KActionCollection; class QFont; +class QGraphicsScale; class QKeyEvent; class QVector2D; diff --git a/libkwineffects/kwinglcolorcorrection.h b/libkwineffects/kwinglcolorcorrection.h index ad40c7aa9d..801d4fb25f 100644 --- a/libkwineffects/kwinglcolorcorrection.h +++ b/libkwineffects/kwinglcolorcorrection.h @@ -21,11 +21,9 @@ along with this program. If not, see . #ifndef KWIN_COLOR_CORRECTION_H #define KWIN_COLOR_CORRECTION_H -#include "kwinglutils_funcs.h" +#include "kwinglobals.h" #include -#include -#include namespace KWin { diff --git a/libkwineffects/kwinglcolorcorrection_p.h b/libkwineffects/kwinglcolorcorrection_p.h index 0d7e247ad6..50a274f769 100644 --- a/libkwineffects/kwinglcolorcorrection_p.h +++ b/libkwineffects/kwinglcolorcorrection_p.h @@ -22,6 +22,7 @@ along with this program. If not, see . #define KWIN_COLOR_CORRECTION_P_H_ #include "kwinglcolorcorrection.h" +#include "kwinglutils_funcs.h" #include #include diff --git a/libkwineffects/kwinglobals.h b/libkwineffects/kwinglobals.h index aa2681cc76..869806557d 100644 --- a/libkwineffects/kwinglobals.h +++ b/libkwineffects/kwinglobals.h @@ -22,8 +22,6 @@ along with this program. If not, see . #define KWIN_LIB_KWINGLOBALS_H #include -#include -#include #include diff --git a/libkwineffects/kwingltexture.h b/libkwineffects/kwingltexture.h index 7a9df72770..79300e256b 100644 --- a/libkwineffects/kwingltexture.h +++ b/libkwineffects/kwingltexture.h @@ -25,6 +25,7 @@ along with this program. If not, see . #include "kwinglobals.h" #include +#include #include #include diff --git a/libkwineffects/kwingltexture_p.h b/libkwineffects/kwingltexture_p.h index 9675ec60ac..d101f08c32 100644 --- a/libkwineffects/kwingltexture_p.h +++ b/libkwineffects/kwingltexture_p.h @@ -28,9 +28,12 @@ along with this program. If not, see . #include #include +#include namespace KWin { +// forward declarations +class GLVertexBuffer; class KWIN_EXPORT GLTexturePrivate : public QSharedData diff --git a/libkwineffects/kwinglutils.h b/libkwineffects/kwinglutils.h index f680943982..4b7b4d89da 100644 --- a/libkwineffects/kwinglutils.h +++ b/libkwineffects/kwinglutils.h @@ -22,17 +22,14 @@ along with this program. If not, see . #ifndef KWIN_GLUTILS_H #define KWIN_GLUTILS_H -#include - -#include - -#include -#include -#include -#include - +// kwin +#include "kwinglutils_funcs.h" #include "kwingltexture.h" +// Qt +#include +#include + /** @addtogroup kwineffects */ /** @{ */ @@ -47,8 +44,6 @@ template< class K, class V > class QHash; namespace KWin { - -class GLTexture; class GLVertexBuffer; class GLVertexBufferPrivate; diff --git a/libkwineffects/kwinxrenderutils.cpp b/libkwineffects/kwinxrenderutils.cpp index 1cbef472f2..85f0d0fd22 100644 --- a/libkwineffects/kwinxrenderutils.cpp +++ b/libkwineffects/kwinxrenderutils.cpp @@ -107,7 +107,7 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth) return pic; } -XRenderPicture::XRenderPicture(QPixmap pix) +XRenderPicture::XRenderPicture(const QPixmap &pix) { if (!Extensions::nonNativePixmaps()) { d = new XRenderPictureData(createPicture(pix.handle(), pix.depth())); diff --git a/libkwineffects/kwinxrenderutils.h b/libkwineffects/kwinxrenderutils.h index 84df9d2d0e..f2ad1c3317 100644 --- a/libkwineffects/kwinxrenderutils.h +++ b/libkwineffects/kwinxrenderutils.h @@ -21,17 +21,18 @@ along with this program. If not, see . #ifndef KWIN_XRENDERUTILS_H #define KWIN_XRENDERUTILS_H -#include - -#include -#include -#include - +// KWin #include - +// KDE +#include +// Qt +#include +#include +// XCB #include class QColor; +class QPixmap; /** @addtogroup kwineffects */ /** @{ */ @@ -68,7 +69,7 @@ class KWIN_EXPORT XRenderPicture public: explicit XRenderPicture(xcb_render_picture_t pic = XCB_RENDER_PICTURE_NONE); // TODO: Qt5 - replace QPixmap by QImage to make it more obvious that it uses PutImage - explicit XRenderPicture(QPixmap pix); + explicit XRenderPicture(const QPixmap &pix); XRenderPicture(xcb_pixmap_t pix, int depth); operator xcb_render_picture_t(); private: diff --git a/scene_opengl.cpp b/scene_opengl.cpp index a9c5d84683..0821e51436 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -55,6 +55,7 @@ along with this program. If not, see . #include #include #include +#include #include #include #include diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index 4b723295d8..4bf5a91e8e 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -25,6 +25,7 @@ along with this program. If not, see . #include #include #include +#include #include namespace KWin diff --git a/tests/test_screen_paint_data.cpp b/tests/test_screen_paint_data.cpp index 3202876cfb..82b7506f67 100644 --- a/tests/test_screen_paint_data.cpp +++ b/tests/test_screen_paint_data.cpp @@ -21,6 +21,7 @@ along with this program. If not, see . #include #include +#include #include diff --git a/tests/test_window_paint_data.cpp b/tests/test_window_paint_data.cpp index e9de7e8367..419b2405b4 100644 --- a/tests/test_window_paint_data.cpp +++ b/tests/test_window_paint_data.cpp @@ -21,6 +21,8 @@ along with this program. If not, see . #include #include +#include +#include #include