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 <kwinconfig.h>
#include <QVector3D>
#include <math.h>

View file

@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Qt
#include <QTimer>
#include <QPainter>
#include <QVector4D>
// xcb
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
#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 <QtCore/QVarLengthArray>
#include <QtGui/QPainter>
#include <QMatrix4x4>
#include <xcb/xcb_image.h>
namespace KWin

View file

@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kconfiggroup.h>
#include <QtCore/QTimeLine>
#include <QGraphicsRotation>
#include <QVector3D>
// 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 <QTimer>
#include <QVector3D>
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/QPixmap>
#include <QtGui/QVector2D>
#include <QGraphicsRotation>
#include <QGraphicsScale>
#include <kdebug.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/QSet>
#include <QtCore/QRect>
#include <QtGui/QGraphicsRotation>
#include <QtGui/QRegion>
#include <QtCore/QVector>
@ -48,6 +47,7 @@ class KLibrary;
class KConfigGroup;
class KActionCollection;
class QFont;
class QGraphicsScale;
class QKeyEvent;
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
#define KWIN_COLOR_CORRECTION_H
#include "kwinglutils_funcs.h"
#include "kwinglobals.h"
#include <QObject>
#include <QMap>
#include <QRect>
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_
#include "kwinglcolorcorrection.h"
#include "kwinglutils_funcs.h"
#include <QDBusAbstractInterface>
#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
#include <QtGui/QX11Info>
#include <QtCore/QPoint>
#include <QtGui/QRegion>
#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 <QtCore/QSize>
#include <QRegion>
#include <QSharedPointer>
#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/QSharedData>
#include <QImage>
namespace KWin
{
// forward declarations
class GLVertexBuffer;
class KWIN_EXPORT GLTexturePrivate
: public QSharedData

View file

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

View file

@ -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()));

View file

@ -21,17 +21,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KWIN_XRENDERUTILS_H
#define KWIN_XRENDERUTILS_H
#include <kwinconfig.h>
#include <QtCore/QSharedData>
#include <QVector>
#include <ksharedptr.h>
// KWin
#include <kwinglobals.h>
// KDE
#include <KDE/KSharedPtr>
// Qt
#include <QRegion>
#include <QVector>
// XCB
#include <xcb/xfixes.h>
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:

View file

@ -55,6 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QDBusConnection>
#include <QDBusConnectionInterface>
#include <QDBusInterface>
#include <QGraphicsScale>
#include <QDesktopWidget>
#include <QStringList>
#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/QSize>
#include <QtCore/QStringList>
#include <QRect>
#include <kwinglobals.h>
namespace KWin

View file

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