summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems
diff options
context:
space:
mode:
authorMichael Dominic K <mdk@codethink.co.uk>2010-12-08 09:52:36 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-12-08 09:52:36 (GMT)
commit8e01304939a19b65267887b220aa9814fc56b350 (patch)
tree9cec3b8fcd4d32af88d8d2da2c7ced269c8cd040 /src/plugins/graphicssystems
parenteac9e6a11e7727d8a749242f317362337ce89a1d (diff)
downloadQt-8e01304939a19b65267887b220aa9814fc56b350.zip
Qt-8e01304939a19b65267887b220aa9814fc56b350.tar.gz
Qt-8e01304939a19b65267887b220aa9814fc56b350.tar.bz2
Make sure QMeeGoGraphicsSystem::setTranslucent can't be called if surface already created.
Merge-request: 967 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/graphicssystems')
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index 507f70b..4a86082 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -124,8 +124,10 @@ QPixmapData* QMeeGoGraphicsSystem::wrapPixmapData(QPixmapData *pmd)
void QMeeGoGraphicsSystem::setSurfaceFixedSize(int /*width*/, int /*height*/)
{
- if (QMeeGoGraphicsSystem::surfaceWasCreated)
+ if (QMeeGoGraphicsSystem::surfaceWasCreated) {
qWarning("Trying to set surface fixed size but surface already created!");
+ return;
+ }
#ifdef QT_WAS_PATCHED
QEglProperties *properties = new QEglProperties();
@@ -143,6 +145,11 @@ void QMeeGoGraphicsSystem::setSurfaceScaling(int x, int y, int width, int height
void QMeeGoGraphicsSystem::setTranslucent(bool translucent)
{
+ if (QMeeGoGraphicsSystem::surfaceWasCreated) {
+ qWarning("Trying to set translucency but surface already created!");
+ return;
+ }
+
QGLWindowSurface::surfaceFormat.setSampleBuffers(false);
QGLWindowSurface::surfaceFormat.setSamples(0);
QGLWindowSurface::surfaceFormat.setAlpha(translucent);