From 389ca4b5931efbf2bcac050ec80ec7971b61c857 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 28 May 2009 13:17:27 +0200 Subject: Compile fix with namespaces. --- examples/webkit/fancybrowser/mainwindow.h | 2 +- src/corelib/kernel/qsharedmemory_unix.cpp | 2 -- src/gui/graphicsview/qgraphicsitem_p.h | 4 ++-- src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp | 4 ++++ src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 4 ++++ src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 4 +++- src/opengl/gl2paintengineex/qglgradientcache.cpp | 4 ++++ src/opengl/gl2paintengineex/qglgradientcache_p.h | 4 +++- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 7 ++++++- src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 4 ++++ 10 files changed, 31 insertions(+), 8 deletions(-) diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h index 2e1068c..ba0bede 100644 --- a/examples/webkit/fancybrowser/mainwindow.h +++ b/examples/webkit/fancybrowser/mainwindow.h @@ -41,8 +41,8 @@ #include -QT_BEGIN_NAMESPACE class QWebView; +QT_BEGIN_NAMESPACE class QLineEdit; QT_END_NAMESPACE diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index 12f21b7..9187ad3 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -51,8 +51,6 @@ #ifndef QT_NO_SHAREDMEMORY -QT_BEGIN_NAMESPACE - #include #include #include diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 62e0411..bd81fe5 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -423,10 +423,10 @@ public: QGraphicsItem *q_ptr; }; -Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *) - QT_END_NAMESPACE +Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *) + #endif // QT_NO_GRAPHICSVIEW #endif diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index f237847..560ad3a 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -43,6 +43,8 @@ #include +QT_BEGIN_NAMESPACE + void QGL2PEXVertexArray::clear() { vertexArray.reset(); @@ -160,3 +162,5 @@ void QGL2PEXVertexArray::curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, } } } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index 35566ca..d7a9f73 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -59,6 +59,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QGLPoint { public: @@ -124,4 +126,6 @@ private: inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale); }; +QT_END_NAMESPACE + #endif diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 514aac0..f64af85 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -47,6 +47,8 @@ #endif +QT_BEGIN_NAMESPACE + const char* QGLEngineShaderManager::qglEngineShaderSourceCode[] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, @@ -462,4 +464,4 @@ void QGLEngineShaderManager::compileNamedShader(QGLEngineShaderManager::ShaderNa compiledShaders[name] = newShader; } - +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglgradientcache.cpp b/src/opengl/gl2paintengineex/qglgradientcache.cpp index 2239c2f..f1a8850 100644 --- a/src/opengl/gl2paintengineex/qglgradientcache.cpp +++ b/src/opengl/gl2paintengineex/qglgradientcache.cpp @@ -44,6 +44,8 @@ #include "qglgradientcache_p.h" +QT_BEGIN_NAMESPACE + void QGL2GradientCache::cleanCache() { QGLGradientColorTableHash::const_iterator it = cache.constBegin(); for (; it != cache.constEnd(); ++it) { @@ -180,3 +182,5 @@ void QGL2GradientCache::generateGradientColorTable(const QGradient& gradient, ui // Make sure the last color stop is represented at the end of the table colorTable[size-1] = last_color; } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglgradientcache_p.h b/src/opengl/gl2paintengineex/qglgradientcache_p.h index 6acaa00..9bf58c7 100644 --- a/src/opengl/gl2paintengineex/qglgradientcache_p.h +++ b/src/opengl/gl2paintengineex/qglgradientcache_p.h @@ -54,6 +54,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QGL2GradientCache : public QObject { Q_OBJECT @@ -104,5 +106,5 @@ public slots: } }; - +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 5b33421..338919e 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -80,7 +80,11 @@ #include "qgl2pexvertexarray_p.h" -extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp +#include + +QT_BEGIN_NAMESPACE + +extern QImage qt_imageForBrush(int brushStyle, bool invert); static const GLuint QT_BRUSH_TEXTURE_UNIT = 0; static const GLuint QT_IMAGE_TEXTURE_UNIT = 0; //Can be the same as brush texture unit @@ -1328,3 +1332,4 @@ QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState() { } +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 34ab6b3..ef62390 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -65,6 +65,8 @@ enum EngineMode { BrushDrawingMode }; +QT_BEGIN_NAMESPACE + class QGL2PaintEngineExPrivate; @@ -209,4 +211,6 @@ public: uint use_system_clip : 1; }; +QT_END_NAMESPACE + #endif -- cgit v0.12