Skip to content

Commit

Permalink
Compile fix with namespaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjk committed May 28, 2009
1 parent 54aaf1f commit 389ca4b
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/webkit/fancybrowser/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

#include <QtGui>

QT_BEGIN_NAMESPACE
class QWebView;
QT_BEGIN_NAMESPACE
class QLineEdit;
QT_END_NAMESPACE

Expand Down
2 changes: 0 additions & 2 deletions src/corelib/kernel/qsharedmemory_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@

#ifndef QT_NO_SHAREDMEMORY

QT_BEGIN_NAMESPACE

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
Expand Down
4 changes: 2 additions & 2 deletions src/gui/graphicsview/qgraphicsitem_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ class Q_AUTOTEST_EXPORT QGraphicsItemPrivate
QGraphicsItem *q_ptr;
};

Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *)

QT_END_NAMESPACE

Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *)

#endif // QT_NO_GRAPHICSVIEW

#endif
4 changes: 4 additions & 0 deletions src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

#include <private/qbezier_p.h>

QT_BEGIN_NAMESPACE

void QGL2PEXVertexArray::clear()
{
vertexArray.reset();
Expand Down Expand Up @@ -160,3 +162,5 @@ void QGL2PEXVertexArray::curveToArray(const QGLPoint &cp1, const QGLPoint &cp2,
}
}
}

QT_END_NAMESPACE
4 changes: 4 additions & 0 deletions src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
#include <private/qvectorpath_p.h>
#include <private/qgl_p.h>

QT_BEGIN_NAMESPACE

class QGLPoint
{
public:
Expand Down Expand Up @@ -124,4 +126,6 @@ class QGL2PEXVertexArray
inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale);
};

QT_END_NAMESPACE

#endif
4 changes: 3 additions & 1 deletion src/opengl/gl2paintengineex/qglengineshadermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -462,4 +464,4 @@ void QGLEngineShaderManager::compileNamedShader(QGLEngineShaderManager::ShaderNa
compiledShaders[name] = newShader;
}


QT_END_NAMESPACE
4 changes: 4 additions & 0 deletions src/opengl/gl2paintengineex/qglgradientcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/opengl/gl2paintengineex/qglgradientcache_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#include <QObject>
#include <QtOpenGL>

QT_BEGIN_NAMESPACE

class QGL2GradientCache : public QObject
{
Q_OBJECT
Expand Down Expand Up @@ -104,5 +106,5 @@ public slots:
}
};


QT_END_NAMESPACE

7 changes: 6 additions & 1 deletion src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@
#include "qgl2pexvertexarray_p.h"


extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp
#include <QDebug>

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
Expand Down Expand Up @@ -1328,3 +1332,4 @@ QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState()
{
}

QT_END_NAMESPACE
4 changes: 4 additions & 0 deletions src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ enum EngineMode {
BrushDrawingMode
};

QT_BEGIN_NAMESPACE

class QGL2PaintEngineExPrivate;


Expand Down Expand Up @@ -209,4 +211,6 @@ class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate
uint use_system_clip : 1;
};

QT_END_NAMESPACE

#endif

0 comments on commit 389ca4b

Please sign in to comment.