From 1113344ece060bb7386ea540becbf59f9c8320ea Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Fri, 8 Oct 2010 11:39:49 +0200 Subject: Crash fix when using the runtime graphics system on Symbian. If QWidget::destroy() is called (perhaps by setParent) then the window surface is deleted by the destructor of QSymbianControl instead of in the "normal" place which is ~QWidget(). This means that we should not attempt to use the RWindow in the window surface because it is in the process of being destroyed. Reviewed-by: Jani Hautakangas --- src/gui/painting/qwindowsurface_s60.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index 8bac1f5..ea19fcd 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -101,9 +101,11 @@ QS60WindowSurface::~QS60WindowSurface() // Issue empty redraw to clear the UI surface QWidget *w = window(); - RWindow *const window = static_cast(w->winId()->DrawableWindow()); - window->BeginRedraw(); - window->EndRedraw(); + if (w->testAttribute(Qt::WA_WState_Created)) { + RWindow *const window = static_cast(w->winId()->DrawableWindow()); + window->BeginRedraw(); + window->EndRedraw(); + } } } #endif -- cgit v0.12 From edddadd88950f22f6d813e50acdcf2711d3d5a84 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Tue, 12 Oct 2010 10:58:11 +0200 Subject: Add support for Qt::WA_TranslucentBackground with OpenVG on Symbian^3 S^3 does not have a client side API to support semi-transparent EGL surfaces so if this flag is enabled for a particular widget, then we should return a raster surface instead of a VG surface. Raster surfaces can still be semi-transparent but will be slower to render to. Task-number: QTBUG-14400 Reviewed-by: Jani Hautakangas Reviewed-by: Gareth Stockwell Reviewed-by: Sami Merila --- src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp index 2c7c0b7..9674233 100644 --- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp +++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp @@ -42,6 +42,9 @@ #include "qgraphicssystem_vg_p.h" #include #include +#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE) +#include +#endif QT_BEGIN_NAMESPACE @@ -64,6 +67,11 @@ QPixmapData *QVGGraphicsSystem::createPixmapData(QPixmapData::PixelType type) co QWindowSurface *QVGGraphicsSystem::createWindowSurface(QWidget *widget) const { +#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE) + QWidgetPrivate *d = qt_widget_private(widget); + if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground)) + return d->createDefaultWindowSurface_sys(); +#endif return new QVGWindowSurface(widget); } -- cgit v0.12