summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-11-18 11:49:45 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-18 03:18:48 +0100
commitfc3705cd04fcb3b2e876d606071423be948b98d1 (patch)
tree0a647e1e11b69c8af250f18be8a2802af03756ed /src/plugins/platforms/xcb
parent21942553294dcbc1afca6f575852c237c1da3ff0 (diff)
Fixed crashes from tests using xcb plugin with -qtnamespace.
Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE consistently in xcb plugin. Some, but not all, of the sources were already using QT_BEGIN_NAMESPACE. Change-Id: I23b83cc88870fd4039437b733084ab86dd807356 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qdri2context.cpp4
-rw-r--r--src/plugins/platforms/xcb/qdri2context.h8
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp3
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_maemo.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbeglsurface.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbobject.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp4
12 files changed, 49 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qdri2context.cpp b/src/plugins/platforms/xcb/qdri2context.cpp
index 5f4aff5455..31e613d4ba 100644
--- a/src/plugins/platforms/xcb/qdri2context.cpp
+++ b/src/plugins/platforms/xcb/qdri2context.cpp
@@ -59,6 +59,8 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+QT_BEGIN_NAMESPACE
+
class QDri2ContextPrivate
{
public:
@@ -267,3 +269,5 @@ void * QDri2Context::eglContext() const
Q_D(const QDri2Context);
return d->eglContext;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qdri2context.h b/src/plugins/platforms/xcb/qdri2context.h
index ec8b251c3f..6b93a0a93f 100644
--- a/src/plugins/platforms/xcb/qdri2context.h
+++ b/src/plugins/platforms/xcb/qdri2context.h
@@ -44,11 +44,13 @@
#include <QtGui/QPlatformOpenGLContext>
+struct xcb_dri2_dri2_buffer_t;
+
+QT_BEGIN_NAMESPACE
+
class QXcbWindow;
class QDri2ContextPrivate;
-struct xcb_dri2_dri2_buffer_t;
-
class QDri2Context : public QPlatformOpenGLContext
{
Q_DECLARE_PRIVATE(QDri2Context);
@@ -74,4 +76,6 @@ private:
Q_DISABLE_COPY(QDri2Context)
};
+QT_END_NAMESPACE
+
#endif // QDRI2CONTEXT_H
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index 41bceaf406..550a5e4184 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -58,6 +58,8 @@
#include <dlfcn.h>
#endif
+QT_BEGIN_NAMESPACE
+
QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
: QPlatformOpenGLContext()
, m_screen(screen)
@@ -134,3 +136,5 @@ QSurfaceFormat QGLXContext::format() const
{
return m_format;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qglxintegration.h b/src/plugins/platforms/xcb/qglxintegration.h
index bbe67b653a..2c8fea5874 100644
--- a/src/plugins/platforms/xcb/qglxintegration.h
+++ b/src/plugins/platforms/xcb/qglxintegration.h
@@ -52,6 +52,8 @@
#include <GL/glx.h>
+QT_BEGIN_NAMESPACE
+
class QGLXContext : public QPlatformOpenGLContext
{
public:
@@ -73,4 +75,6 @@ private:
QSurfaceFormat m_format;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 2c6ec62475..fb8384212d 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -58,6 +58,8 @@
#include <qpainter.h>
#include <qscreen.h>
+QT_BEGIN_NAMESPACE
+
class QXcbShmImage : public QXcbObject
{
public:
@@ -321,3 +323,4 @@ bool QXcbBackingStore::scroll(const QRegion &area, int dx, int dy)
return true;
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h
index db94d26b09..a389f97ac3 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.h
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.h
@@ -48,6 +48,8 @@
#include "qxcbobject.h"
+QT_BEGIN_NAMESPACE
+
class QXcbShmImage;
class QXcbBackingStore : public QXcbObject, public QPlatformBackingStore
@@ -69,4 +71,6 @@ private:
bool m_syncingResize;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp b/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
index 4ab7865758..327f7c54f6 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
@@ -49,6 +49,8 @@
#include <X11/extensions/XI2proto.h>
#include <X11/Xatom.h>
+QT_BEGIN_NAMESPACE
+
// Define it here to work around XLib defining Bool and stuff.
// We can't declare those variables in the header without facing include order headaches.
struct XInput2Data {
@@ -290,6 +292,8 @@ void QXcbConnection::handleGenericEvent(xcb_ge_event_t *event)
}
}
+QT_END_NAMESPACE
+
#endif // XCB_USE_XINPUT2_MAEMO
diff --git a/src/plugins/platforms/xcb/qxcbeglsurface.h b/src/plugins/platforms/xcb/qxcbeglsurface.h
index a1e6c148a2..a372cd9830 100644
--- a/src/plugins/platforms/xcb/qxcbeglsurface.h
+++ b/src/plugins/platforms/xcb/qxcbeglsurface.h
@@ -44,6 +44,8 @@
#include <EGL/egl.h>
+QT_BEGIN_NAMESPACE
+
class QXcbEGLSurface
{
public:
@@ -65,4 +67,6 @@ private:
EGLSurface m_surface;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index aa5c7e444b..e6b9a18323 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -80,6 +80,8 @@
#include <QtGui/QScreen>
#include <QtGui/QPlatformAccessibility>
+QT_BEGIN_NAMESPACE
+
QXcbIntegration::QXcbIntegration(const QStringList &parameters)
: m_eventDispatcher(createUnixEventDispatcher())
{
@@ -239,3 +241,5 @@ QPlatformAccessibility *QXcbIntegration::accessibility() const
{
return m_accessibility;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 1f13daea0a..a2a519c793 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -261,6 +261,8 @@
#define QTOPIAXK_Hangup 0x1100060F
#define QTOPIAXK_Flip 0x11000610
+QT_BEGIN_NAMESPACE
+
// keyboard mapping table
static const unsigned int KeyTbl[] = {
@@ -1136,3 +1138,5 @@ void QXcbKeyboard::handleMappingNotifyEvent(const xcb_mapping_notify_event_t *ev
xcb_refresh_keyboard_mapping(m_key_symbols, const_cast<xcb_mapping_notify_event_t *>(event));
setupModifiers();
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbobject.h b/src/plugins/platforms/xcb/qxcbobject.h
index 089c76ef94..a594066545 100644
--- a/src/plugins/platforms/xcb/qxcbobject.h
+++ b/src/plugins/platforms/xcb/qxcbobject.h
@@ -44,6 +44,8 @@
#include "qxcbconnection.h"
+QT_BEGIN_NAMESPACE
+
class QXcbObject
{
public:
@@ -59,4 +61,6 @@ private:
QXcbConnection *m_connection;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 386dbdc49f..1336ddb32a 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -48,6 +48,8 @@
#include <QDebug>
+QT_BEGIN_NAMESPACE
+
QXcbScreen::QXcbScreen(QXcbConnection *connection, xcb_screen_t *screen, int number)
: QXcbObject(connection)
, m_screen(screen)
@@ -354,3 +356,5 @@ QString QXcbScreen::name() const
{
return connection()->displayName() + QLatin1String(".") + QString::number(screenNumber());
}
+
+QT_END_NAMESPACE