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>
This commit is contained in:
parent
2194255329
commit
fc3705cd04
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -80,6 +80,8 @@
|
||||
#include <QtGui/QScreen>
|
||||
#include <QtGui/QPlatformAccessibility>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QXcbIntegration::QXcbIntegration(const QStringList ¶meters)
|
||||
: m_eventDispatcher(createUnixEventDispatcher())
|
||||
{
|
||||
@ -239,3 +241,5 @@ QPlatformAccessibility *QXcbIntegration::accessibility() const
|
||||
{
|
||||
return m_accessibility;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user