From cef94ba96e4fd45506dff793accd8603765de7f4 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 31 Aug 2009 10:29:51 -0700 Subject: Clean up directfb ifdefs Make sure all files are wrapped in QT_NO_QWS_DIRECTFB Reviewed-by: Donald Carr --- src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp | 8 +++----- src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h | 6 +++--- src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp | 4 +++- src/plugins/gfxdrivers/directfb/qdirectfbmouse.h | 8 +++----- src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp | 7 +++---- src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h | 4 +++- src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 4 ++-- src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h | 4 ++++ src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 5 +++++ src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h | 4 ++++ src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 4 +++- src/plugins/gfxdrivers/directfb/qdirectfbscreen.h | 4 ++++ src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.cpp | 3 +++ src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 5 +++++ src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h | 5 ++++- 15 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp index 44ce72b3..2bf1614 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp @@ -41,8 +41,6 @@ #include "qdirectfbkeyboard.h" -#ifndef QT_NO_DIRECTFB - #include "qdirectfbscreen.h" #include #include @@ -53,6 +51,8 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_NAMESPACE class KeyMap : public QHash @@ -432,7 +432,5 @@ KeyMap::KeyMap() } QT_END_NAMESPACE - #include "qdirectfbkeyboard.moc" - -#endif // QT_NO_DIRECTFB +#endif // QT_NO_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h b/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h index 14618bb..826de3b 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h @@ -44,14 +44,14 @@ #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Gui) -#ifndef QT_NO_DIRECTFB - class QDirectFBKeyboardHandlerPrivate; class QDirectFBKeyboardHandler : public QWSKeyboardHandler @@ -66,7 +66,7 @@ private: QT_END_NAMESPACE -#endif // QT_NO_DIRECTFB +#endif // QT_NO_QWS_DIRECTFB QT_END_HEADER diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp index 8d30f93..074904f 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp @@ -49,6 +49,8 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_NAMESPACE class QDirectFBMouseHandlerPrivate : public QObject @@ -272,7 +274,7 @@ void QDirectFBMouseHandler::resume() } QT_END_NAMESPACE - #include "qdirectfbmouse.moc" +#endif // QT_NO_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.h b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.h index 37d0845..fcb995e 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.h @@ -44,14 +44,14 @@ #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Gui) -#ifndef QT_NO_DIRECTFB - class QDirectFBMouseHandlerPrivate; class QDirectFBMouseHandler : public QWSMouseHandler @@ -67,10 +67,8 @@ protected: QDirectFBMouseHandlerPrivate *d; }; -#endif // QT_NO_DIRECTFB - QT_END_NAMESPACE QT_END_HEADER - +#endif // QT_NO_QWS_DIRECTFB #endif // QDIRECTFBMOUSE_H diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp index e839b47..106de0d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#ifndef QT_NO_DIRECTFB - #include "qdirectfbscreen.h" #include "qdirectfbpaintdevice.h" #include "qdirectfbpaintengine.h" +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_NAMESPACE QDirectFBPaintDevice::QDirectFBPaintDevice(QDirectFBScreen *scr) @@ -173,5 +173,4 @@ QPaintEngine *QDirectFBPaintDevice::paintEngine() const QT_END_NAMESPACE -#endif - +#endif // QT_NO_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index 5befeab..aed1cb5 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -43,9 +43,10 @@ #define QDIRECTFBPAINTDEVICE_H #include -#include #include "qdirectfbscreen.h" +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -100,4 +101,5 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_QWS_DIRECTFB #endif //QDIRECTFBPAINTDEVICE_H diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 384a76a..9a9553e 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -41,7 +41,7 @@ #include "qdirectfbpaintengine.h" -#ifndef QT_NO_DIRECTFB +#ifndef QT_NO_QWS_DIRECTFB #include "qdirectfbwindowsurface.h" #include "qdirectfbscreen.h" @@ -1253,4 +1253,4 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * QT_END_NAMESPACE -#endif // QT_NO_DIRECTFB +#endif // QT_NO_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h index ff67d14..b4f0b5d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h @@ -45,6 +45,8 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -113,4 +115,6 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_QWS_DIRECTFB + #endif // QPAINTENGINE_DIRECTFB_P_H diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index e921d24..ee63842 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -48,6 +48,8 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_NAMESPACE static int global_ser_no = 0; @@ -578,4 +580,7 @@ void QDirectFBPixmapData::invalidate() QT_END_NAMESPACE +#endif // QT_NO_QWS_DIRECTFB + + diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h index fd59a93..77364fd 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h @@ -42,6 +42,8 @@ #ifndef QDIRECTFBPIXMAP_H #define QDIRECTFBPIXMAP_H +#ifndef QT_NO_QWS_DIRECTFB + #include #include #include "qdirectfbpaintdevice.h" @@ -97,4 +99,6 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_QWS_DIRECTFB + #endif // QDIRECTFBPIXMAP_H diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 069ec5a..664c8a8 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -54,6 +54,8 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_NAMESPACE class QDirectFBScreenPrivate : public QObject, public QWSGraphicsSystem @@ -1565,5 +1567,5 @@ IDirectFBSurface *QDirectFBScreen::subSurfaceForWidget(const QWidget *widget, co QT_END_NAMESPACE #include "qdirectfbscreen.moc" - +#endif // QT_NO_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 3e27ed1..14fde86 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -42,6 +42,8 @@ #ifndef QDIRECTFBSCREEN_H #define QDIRECTFBSCREEN_H +#include +#ifndef QT_NO_QWS_DIRECTFB #include #include #include @@ -275,4 +277,6 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_QWS_DIRECTFB #endif // QDIRECTFBSCREEN_H + diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.cpp index 4caee414..05fe70f 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.cpp @@ -43,6 +43,7 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB class DirectFBScreenDriverPlugin : public QScreenDriverPlugin { @@ -73,3 +74,5 @@ QScreen* DirectFBScreenDriverPlugin::create(const QString& driver, } Q_EXPORT_PLUGIN2(qdirectfbscreen, DirectFBScreenDriverPlugin) + +#endif diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 421fbc2..82c8a41 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -48,6 +48,8 @@ #include #include +#ifndef QT_NO_QWS_DIRECTFB + QT_BEGIN_NAMESPACE QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirectFBScreen *scr) @@ -454,3 +456,6 @@ void QDirectFBWindowSurface::updateFormat() QT_END_NAMESPACE +#endif // QT_NO_QWS_DIRECTFB + + diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h index 771b7b5..bb81e1a 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h @@ -46,9 +46,10 @@ #include "qdirectfbpaintdevice.h" #include "qdirectfbscreen.h" +#ifndef QT_NO_QWS_DIRECTFB + #include #include -#include #ifdef QT_DIRECTFB_TIMING #include @@ -116,4 +117,6 @@ QT_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_QWS_DIRECTFB + #endif // QDIRECFBWINDOWSURFACE_H -- cgit v0.12