diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qplatformwindow_qpa.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformwindow_qpa.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.h | 3 | ||||
-rw-r--r-- | src/plugins/platforms/openkode/qopenkodewindow.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/openkode/qopenkodewindow.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/testlite/qglxintegration.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/testlite/qtestlitewindow.cpp | 11 | ||||
-rw-r--r-- | src/plugins/platforms/testlite/qtestlitewindow.h | 3 |
9 files changed, 12 insertions, 17 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index 4cd8ead..4ac4736 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -120,7 +120,7 @@ void QPlatformWindow::setOpacity(qreal level) qWarning("This plugin does not support setting window opacity"); } -QPlatformGLContext *QPlatformWindow::glContext() +QPlatformGLContext *QPlatformWindow::glContext() const { return 0; } diff --git a/src/gui/kernel/qplatformwindow_qpa.h b/src/gui/kernel/qplatformwindow_qpa.h index e8b5ad8..2275c02 100644 --- a/src/gui/kernel/qplatformwindow_qpa.h +++ b/src/gui/kernel/qplatformwindow_qpa.h @@ -79,7 +79,7 @@ public: virtual void setOpacity(qreal level); - virtual QPlatformGLContext *glContext(); + virtual QPlatformGLContext *glContext() const; protected: QScopedPointer<QPlatformWindowPrivate> d_ptr; private: diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp index db15862..86cc98b 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp @@ -71,7 +71,7 @@ WId QEglFSWindow::winId() const -QPlatformGLContext *QEglFSWindow::glContext() +QPlatformGLContext *QEglFSWindow::glContext() const { #ifdef QEGL_EXTRA_DEBUG qWarning("QEglWindow::glContext %p\n", m_screen->platformContext()); diff --git a/src/plugins/platforms/eglfs/qeglfswindow.h b/src/plugins/platforms/eglfs/qeglfswindow.h index f605cf4..0c3bc84 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.h +++ b/src/plugins/platforms/eglfs/qeglfswindow.h @@ -56,11 +56,12 @@ class QEglFSWindow : public QPlatformWindow { public: QEglFSWindow(QWidget *w, QEglFSScreen *screen); - QPlatformGLContext *glContext(); void setGeometry(const QRect &); WId winId() const; + QPlatformGLContext *glContext() const; + private: QEglFSScreen *m_screen; WId m_winid; diff --git a/src/plugins/platforms/openkode/qopenkodewindow.cpp b/src/plugins/platforms/openkode/qopenkodewindow.cpp index 2ad9238..81f38d2 100644 --- a/src/plugins/platforms/openkode/qopenkodewindow.cpp +++ b/src/plugins/platforms/openkode/qopenkodewindow.cpp @@ -169,7 +169,7 @@ void QOpenKODEWindow::setVisible(bool visible) } } -QPlatformGLContext *QOpenKODEWindow::glContext() +QPlatformGLContext *QOpenKODEWindow::glContext() const { return m_platformGlContext; } diff --git a/src/plugins/platforms/openkode/qopenkodewindow.h b/src/plugins/platforms/openkode/qopenkodewindow.h index d11c0d8..3e7ee56 100644 --- a/src/plugins/platforms/openkode/qopenkodewindow.h +++ b/src/plugins/platforms/openkode/qopenkodewindow.h @@ -62,7 +62,7 @@ public: void setVisible(bool visible); WId winId() const { return WId(m_eglWindow); } - QPlatformGLContext *glContext(); + QPlatformGLContext *glContext() const; private: struct KDWindow *m_kdWindow; diff --git a/src/plugins/platforms/testlite/qglxintegration.cpp b/src/plugins/platforms/testlite/qglxintegration.cpp index 4d807b0..e554e8d 100644 --- a/src/plugins/platforms/testlite/qglxintegration.cpp +++ b/src/plugins/platforms/testlite/qglxintegration.cpp @@ -181,7 +181,7 @@ QGLXGLContext::QGLXGLContext(MyDisplay *display, Drawable drawable, GLXContext c QGLXGLContext::~QGLXGLContext() { if (m_context) { - qDebug("Destroying GLX context 0x%x", m_context); + qDebug("Destroying GLX context 0x%p", m_context); glXDestroyContext(m_xd->display, m_context); } } diff --git a/src/plugins/platforms/testlite/qtestlitewindow.cpp b/src/plugins/platforms/testlite/qtestlitewindow.cpp index f774458..67ec97c 100644 --- a/src/plugins/platforms/testlite/qtestlitewindow.cpp +++ b/src/plugins/platforms/testlite/qtestlitewindow.cpp @@ -1011,20 +1011,15 @@ void QTestLiteWindow::setCursor(QCursor * cursor) XFlush(xd->display); } -QPlatformGLContext *QTestLiteWindow::glContext() +QPlatformGLContext *QTestLiteWindow::glContext() const { if (!mGLContext) { - mGLContext = createGLContext(); + QTestLiteWindow *that = const_cast<QTestLiteWindow *>(this); + that->mGLContext = new QGLXGLContext(x_window, xd, widget()->platformWindowFormat()); } return mGLContext; } -QPlatformGLContext *QTestLiteWindow::createGLContext() -{ - QPlatformGLContext *context = new QGLXGLContext(x_window, xd, widget()->platformWindowFormat()); - return context; -} - Cursor QTestLiteWindow::createCursorBitmap(QCursor * cursor) { XColor bg, fg; diff --git a/src/plugins/platforms/testlite/qtestlitewindow.h b/src/plugins/platforms/testlite/qtestlitewindow.h index d405578..dc628f1 100644 --- a/src/plugins/platforms/testlite/qtestlitewindow.h +++ b/src/plugins/platforms/testlite/qtestlitewindow.h @@ -127,7 +127,7 @@ public: void setCursor(QCursor * cursor); - QPlatformGLContext *glContext(); + QPlatformGLContext *glContext() const; private: int xpos, ypos; @@ -138,7 +138,6 @@ private: GC createGC(); Cursor createCursorShape(int cshape); Cursor createCursorBitmap(QCursor * cursor); - QPlatformGLContext *createGLContext(); int currentCursor; |