From 2983e4d26a2492408c49a55a0db9173c1df1456c Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Fri, 23 Jul 2010 15:16:32 +0100 Subject: Ensure backing store is deleted before top-level window If this is not done, later deletion of the backing store may cause a crash. If the backing store is an EGL surface, its destruction includes a call to eglDestroySurface(), which triggers an exception if the window handle passed as a parameter is no longer valid. Task-number: QTBUG-10643 Task-number: QTBUG-11376 Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 0d65811..117c1d5 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -382,6 +382,10 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) QSymbianControl::~QSymbianControl() { + // Ensure backing store is deleted before the top-level + // window is destroyed + qt_widget_private(qwidget)->topData()->backingStore.destroy(); + if (S60->curWin == this) S60->curWin = 0; if (!QApplicationPrivate::is_app_closing) { -- cgit v0.12 From 42c6ab328e813fcb845524725d81739f2af17aa0 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 26 Jul 2010 11:53:28 +0100 Subject: Removed QEXPECT_FAIL macros from test cases which now pass Task-number: QTBUG-10643 Task-number: QTBUG-11376 Reviewed-by: Jason Barron --- tests/auto/qwidget/tst_qwidget.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index f20d27a..f722f89 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -9694,7 +9694,6 @@ void tst_QWidget::destroyBackingStoreWhenHidden() // Native child widget should once again share parent's backing store QVERIFY(0 != backingStore(parent)); - QEXPECT_FAIL("", "QTBUG-10643", Continue); QVERIFY(0 == backingStore(child)); } @@ -9743,7 +9742,7 @@ void tst_QWidget::destroyBackingStoreWhenHidden() QVERIFY(0 != backingStore(child)); // Parent is obscured, therefore its backing store should be destroyed - QEXPECT_FAIL("", "QTBUG-10643", Continue); + QEXPECT_FAIL("", "QTBUG-12406", Continue); QVERIFY(0 == backingStore(parent)); // Disable full screen @@ -9757,7 +9756,6 @@ void tst_QWidget::destroyBackingStoreWhenHidden() // Native child widget should once again share parent's backing store QVERIFY(0 != backingStore(parent)); - QEXPECT_FAIL("", "QTBUG-10643", Continue); QVERIFY(0 == backingStore(child)); } } -- cgit v0.12 From 55625badfab6bfe49c60ab5cd9a586c6bd511579 Mon Sep 17 00:00:00 2001 From: Oleh Vasyura Date: Wed, 21 Jul 2010 13:48:57 +0300 Subject: Fix crash caused by not clearing the QPixmapCache on application exit. The qt_cleanup() function will call CCoeEnv::DestroyEnvironment() on application shutdown. This destruction will in turn tear down the various server sessions associated with the application. One of these sessions is the FBSERV session and if the QPixmapCache attempts to delete a CFbsBitmap after the session has been destroyed, the app will crash. The solution is call QPixmapCache::cleanup() before we destroy the environment. This is inline with what the other platforms do. Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 117c1d5..1c06100 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1460,6 +1460,8 @@ void qt_cleanup() qt_S60Beep = 0; } QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles + QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles + qt_cleanup_symbianFontDatabaseExtras(); // S60 structure and window server session are freed in eventdispatcher destructor as they are needed there -- cgit v0.12 From bf9aaa5e3e8d8310c3797e03de2b19e4143ae913 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 26 Jul 2010 15:22:22 +0200 Subject: Fixed package creation when shadow building. RevBy: Markus Goetz --- bin/createpackage.pl | 3 ++- mkspecs/features/sis_targets.prf | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 8b787cb..984c1fd 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -300,7 +300,8 @@ if($stub) { && $templatepkg !~ m/_installer\.pkg$/i && !$onlyUnsigned) { print("Auto-patching capabilities for self signed package.\n"); - system ("patch_capabilities $pkgoutput"); + my $patch_capabilities = File::Spec->catfile(dirname($0), "patch_capabilities"); + system ("$patch_capabilities $pkgoutput"); } # Create SIS. diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf index 615bbe5..f7e633c 100644 --- a/mkspecs/features/sis_targets.prf +++ b/mkspecs/features/sis_targets.prf @@ -125,25 +125,27 @@ equals(GENERATE_SIS_TARGETS, true) { QMAKE_EXTRA_TARGETS += store_build_target } } else { + qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage) + sis_destdir = $$DESTDIR isEmpty(sis_destdir):sis_destdir = . baseTarget = $$basename(TARGET) !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET) sis_target.target = sis - sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \ + sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) sis_target.depends = first unsigned_sis_target.target = unsigned_sis - unsigned_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg + unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg unsigned_sis_target.depends = first target_sis_target.target = $${sis_destdir}/$${baseTarget}.sis target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis installer_sis_target.target = installer_sis - installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ + installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) installer_sis_target.depends = $${sis_destdir}/$${baseTarget}.sis -- cgit v0.12 From 71df0ad5c02365e3baf8f6996d4b258f5da52a2f Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 27 Jul 2010 11:09:43 +0200 Subject: Fixed plugin build key for Symbian builds under Linux. Task: QTBUG-8962 RevBy: Jason Barron --- configure | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ffd38d0..7fc6aac 100755 --- a/configure +++ b/configure @@ -6929,6 +6929,8 @@ fi # turn off exceptions for the compilers that support it if [ "$PLATFORM_QWS" = "yes" ]; then COMPILER=`echo $XPLATFORM | cut -f 3- -d-` +elif [ "$XPLATFORM" != "$PLATFORM" ]; then + COMPILER=`echo $XPLATFORM | cut -f 2- -d-` else COMPILER=`echo $PLATFORM | cut -f 2- -d-` fi @@ -7407,9 +7409,17 @@ rm -f .options BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS" # extract the operating system from the XPLATFORM TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-` +case "$XPLATFORM" in +symbian*) + QT_BUILD_KEY_SYSTEM_PART="Symbian" + ;; +*) + QT_BUILD_KEY_SYSTEM_PART="$CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER" + ;; +esac # when cross-compiling, don't include build-host information (build key is target specific) -QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS" +QT_BUILD_KEY="$CFG_USER_BUILD_KEY $QT_BUILD_KEY_SYSTEM_PART $BUILD_OPTIONS" if [ -n "$QT_NAMESPACE" ]; then QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE" fi -- cgit v0.12 From d82d8d1fc90b4237e483fea9813ec084633f6f2d Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 27 Jul 2010 14:37:28 +0200 Subject: Fixed gcce linker error when linking against s60main built by armcc. Task: QTBUG-10680 RevBy: Trust me --- src/s60main/s60main.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index 9ea3080..a273897 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -29,6 +29,7 @@ symbian { # Having MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA will cause s60main.lib be unlinkable # against GCCE apps, so remove it MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA + linux-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl } else { error("$$_FILE_ is intended only for Symbian!") } -- cgit v0.12 From 61908af46700c7c1f2e59ce98daeadc2529fef1b Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Tue, 27 Jul 2010 16:27:21 +0200 Subject: Fix signal emission of QDesktopWidget on Symbian. QDesktopWidget on Symbian was not properly emitting the resized() and the workAreaResized() signals. Qt was properly translating the system event and sending the QResizeEvent to the widget, but the signal emission is determined solely based on changes in the QVectors of QRects outlining the screen dimensions. On Symbian, these vectors were never being set and as a result the signals were never omitted. The fix is to set the rects correctly in the init() function which is called by the resizeEvent() handler. Also modify the accessor functions to return the rectangles stored in the vector instead of querying for them each time. Task-number: QTBUG-11433 Reviewed-by: axis Autotest: PASSES --- src/gui/kernel/qdesktopwidget_s60.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp index e4d0bf3..a07f4a7 100644 --- a/src/gui/kernel/qdesktopwidget_s60.cpp +++ b/src/gui/kernel/qdesktopwidget_s60.cpp @@ -103,6 +103,10 @@ void QDesktopWidgetPrivate::init(QDesktopWidget *that) rects->resize(QDesktopWidgetPrivate::screenCount); workrects->resize(QDesktopWidgetPrivate::screenCount); + + (*rects)[0].setRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels); + QRect wr = qt_TRect2QRect(static_cast(S60->appUi())->ClientRect()); + (*workrects)[0].setRect(wr.x(), wr.y(), wr.width(), wr.height()); } void QDesktopWidgetPrivate::cleanup() @@ -146,17 +150,23 @@ QWidget *QDesktopWidget::screen(int /* screen */) return this; } -const QRect QDesktopWidget::availableGeometry(int /* screen */) const +const QRect QDesktopWidget::availableGeometry(int screen) const { - TRect clientRect = static_cast(S60->appUi())->ClientRect(); - return qt_TRect2QRect(clientRect); + Q_D(const QDesktopWidget); + if (screen < 0 || screen >= d->screenCount) + screen = d->primaryScreen; + + return d->workrects->at(screen); } -const QRect QDesktopWidget::screenGeometry(int /* screen */) const +const QRect QDesktopWidget::screenGeometry(int screen) const { Q_D(const QDesktopWidget); - return QRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels); - } + if (screen < 0 || screen >= d->screenCount) + screen = d->primaryScreen; + + return d->rects->at(screen); +} int QDesktopWidget::screenNumber(const QWidget * /* widget */) const { -- cgit v0.12