summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfsintegration.cpp
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-04-02 14:34:36 -0700
committerQt by Nokia <qt-info@nokia.com>2012-04-03 10:45:02 +0200
commitf913859f88c5f032833f6eeb1c9c3066f4405a9a (patch)
tree0f965a886d806d9a9b4f48945811be931bffc858 /src/plugins/platforms/eglfs/qeglfsintegration.cpp
parentf578e5236359a88f3a89f529b54efac1df86ea76 (diff)
eglfs: delete screen on exit
Delete the screen when the integration gets deleted. The screen destructor destroys the window surface and terminates the egl connection. Note that the egl context is not destroyed since it is managed by QOpenGLContext. Change-Id: Ifb91c20edb6d5db684c37fb84d5ff40436f40925 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsintegration.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index d180de349e..ef889cd70d 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -57,15 +57,20 @@
QT_BEGIN_NAMESPACE
QEglFSIntegration::QEglFSIntegration()
- : mFontDb(new QGenericUnixFontDatabase())
+ : mFontDb(new QGenericUnixFontDatabase()), mScreen(new QEglFSScreen(EGL_DEFAULT_DISPLAY))
{
- screenAdded(new QEglFSScreen(EGL_DEFAULT_DISPLAY));
+ screenAdded(mScreen);
#ifdef QEGL_EXTRA_DEBUG
qWarning("QEglIntegration\n");
#endif
}
+QEglFSIntegration::~QEglFSIntegration()
+{
+ delete mScreen;
+}
+
bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
switch (cap) {