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.
This commit is contained in:
Martin Gräßlin 2013-02-26 08:02:27 +01:00
parent 5a2d14baf7
commit b01f5684c5
19 changed files with 36 additions and 26 deletions

View file

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "cubeslideconfig.h" #include "cubeslideconfig.h"
#include <kwinconfig.h> #include <kwinconfig.h>
#include <QVector3D>
#include <math.h> #include <math.h>

View file

@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Qt // Qt
#include <QTimer> #include <QTimer>
#include <QPainter> #include <QPainter>
#include <QVector4D>
// xcb // xcb
#ifdef KWIN_HAVE_XRENDER_COMPOSITING #ifdef KWIN_HAVE_XRENDER_COMPOSITING
#include <xcb/render.h> #include <xcb/render.h>

View file

@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
#include <QtCore/QVarLengthArray> #include <QtCore/QVarLengthArray>
#include <QtGui/QPainter> #include <QtGui/QPainter>
#include <QMatrix4x4>
#include <xcb/xcb_image.h> #include <xcb/xcb_image.h>
namespace KWin namespace KWin

View file

@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <QtCore/QTimeLine> #include <QtCore/QTimeLine>
#include <QGraphicsRotation>
#include <QVector3D>
// Effect is based on fade effect by Philip Falkner // Effect is based on fade effect by Philip Falkner

View file

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QDateTime> #include <QDateTime>
#include <QTimer> #include <QTimer>
#include <QVector3D>
namespace KWin { namespace KWin {

View file

@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtGui/QPainter> #include <QtGui/QPainter>
#include <QtGui/QPixmap> #include <QtGui/QPixmap>
#include <QtGui/QVector2D> #include <QtGui/QVector2D>
#include <QGraphicsRotation>
#include <QGraphicsScale>
#include <kdebug.h> #include <kdebug.h>
#include <ksharedconfig.h> #include <ksharedconfig.h>

View file

@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QPair> #include <QtCore/QPair>
#include <QtCore/QSet> #include <QtCore/QSet>
#include <QtCore/QRect> #include <QtCore/QRect>
#include <QtGui/QGraphicsRotation>
#include <QtGui/QRegion> #include <QtGui/QRegion>
#include <QtCore/QVector> #include <QtCore/QVector>
@ -48,6 +47,7 @@ class KLibrary;
class KConfigGroup; class KConfigGroup;
class KActionCollection; class KActionCollection;
class QFont; class QFont;
class QGraphicsScale;
class QKeyEvent; class QKeyEvent;
class QVector2D; class QVector2D;

View file

@ -21,11 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KWIN_COLOR_CORRECTION_H #ifndef KWIN_COLOR_CORRECTION_H
#define KWIN_COLOR_CORRECTION_H #define KWIN_COLOR_CORRECTION_H
#include "kwinglutils_funcs.h" #include "kwinglobals.h"
#include <QObject> #include <QObject>
#include <QMap>
#include <QRect>
namespace KWin { namespace KWin {

View file

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_COLOR_CORRECTION_P_H_ #define KWIN_COLOR_CORRECTION_P_H_
#include "kwinglcolorcorrection.h" #include "kwinglcolorcorrection.h"
#include "kwinglutils_funcs.h"
#include <QDBusAbstractInterface> #include <QDBusAbstractInterface>
#include <QDBusMetaType> #include <QDBusMetaType>

View file

@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_LIB_KWINGLOBALS_H #define KWIN_LIB_KWINGLOBALS_H
#include <QtGui/QX11Info> #include <QtGui/QX11Info>
#include <QtCore/QPoint>
#include <QtGui/QRegion>
#include <kdemacros.h> #include <kdemacros.h>

View file

@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "kwinglobals.h" #include "kwinglobals.h"
#include <QtCore/QSize> #include <QtCore/QSize>
#include <QRegion>
#include <QSharedPointer> #include <QSharedPointer>
#include <QExplicitlySharedDataPointer> #include <QExplicitlySharedDataPointer>

View file

@ -28,9 +28,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QSize> #include <QtCore/QSize>
#include <QtCore/QSharedData> #include <QtCore/QSharedData>
#include <QImage>
namespace KWin namespace KWin
{ {
// forward declarations
class GLVertexBuffer;
class KWIN_EXPORT GLTexturePrivate class KWIN_EXPORT GLTexturePrivate
: public QSharedData : public QSharedData

View file

@ -22,17 +22,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KWIN_GLUTILS_H #ifndef KWIN_GLUTILS_H
#define KWIN_GLUTILS_H #define KWIN_GLUTILS_H
#include <kwinglutils_funcs.h> // kwin
#include "kwinglutils_funcs.h"
#include <QtGui/QPixmap>
#include <QtGui/QImage>
#include <QtCore/QSize>
#include <QtCore/QSharedData>
#include <QtCore/QStack>
#include "kwingltexture.h" #include "kwingltexture.h"
// Qt
#include <QtCore/QSize>
#include <QtCore/QStack>
/** @addtogroup kwineffects */ /** @addtogroup kwineffects */
/** @{ */ /** @{ */
@ -47,8 +44,6 @@ template< class K, class V > class QHash;
namespace KWin namespace KWin
{ {
class GLTexture;
class GLVertexBuffer; class GLVertexBuffer;
class GLVertexBufferPrivate; class GLVertexBufferPrivate;

View file

@ -107,7 +107,7 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth)
return pic; return pic;
} }
XRenderPicture::XRenderPicture(QPixmap pix) XRenderPicture::XRenderPicture(const QPixmap &pix)
{ {
if (!Extensions::nonNativePixmaps()) { if (!Extensions::nonNativePixmaps()) {
d = new XRenderPictureData(createPicture(pix.handle(), pix.depth())); d = new XRenderPictureData(createPicture(pix.handle(), pix.depth()));

View file

@ -21,17 +21,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KWIN_XRENDERUTILS_H #ifndef KWIN_XRENDERUTILS_H
#define KWIN_XRENDERUTILS_H #define KWIN_XRENDERUTILS_H
#include <kwinconfig.h> // KWin
#include <QtCore/QSharedData>
#include <QVector>
#include <ksharedptr.h>
#include <kwinglobals.h> #include <kwinglobals.h>
// KDE
#include <KDE/KSharedPtr>
// Qt
#include <QRegion>
#include <QVector>
// XCB
#include <xcb/xfixes.h> #include <xcb/xfixes.h>
class QColor; class QColor;
class QPixmap;
/** @addtogroup kwineffects */ /** @addtogroup kwineffects */
/** @{ */ /** @{ */
@ -68,7 +69,7 @@ class KWIN_EXPORT XRenderPicture
public: public:
explicit XRenderPicture(xcb_render_picture_t pic = XCB_RENDER_PICTURE_NONE); 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 // 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); XRenderPicture(xcb_pixmap_t pix, int depth);
operator xcb_render_picture_t(); operator xcb_render_picture_t();
private: private:

View file

@ -55,6 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QDBusConnection> #include <QDBusConnection>
#include <QDBusConnectionInterface> #include <QDBusConnectionInterface>
#include <QDBusInterface> #include <QDBusInterface>
#include <QGraphicsScale>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QStringList> #include <QStringList>
#include <QVector2D> #include <QVector2D>

View file

@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSize> #include <QtCore/QSize>
#include <QtCore/QStringList> #include <QtCore/QStringList>
#include <QRect>
#include <kwinglobals.h> #include <kwinglobals.h>
namespace KWin namespace KWin

View file

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kwineffects.h> #include <kwineffects.h>
#include <QtGui/QVector2D> #include <QtGui/QVector2D>
#include <QVector3D>
#include <QtTest/QtTest> #include <QtTest/QtTest>

View file

@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kwineffects.h> #include <kwineffects.h>
#include <QtGui/QVector2D> #include <QtGui/QVector2D>
#include <QGraphicsRotation>
#include <QGraphicsScale>
#include <QtTest/QtTest> #include <QtTest/QtTest>