From 5bb3af94428d85c9d08b3c4cfb31c4071604b06d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 10 Jun 2011 11:32:26 +0300 Subject: Fix dialog position adjustment regression in Symbian Removal of StyleChange event sending to dialogs in to previous optimization (QTBUG-17840) caused dialogs to no longer adjust their position properly at orientation switch. Added sending of a dummy resize event for dialogs in case of KEikDynamicLayoutVariantSwitch to trigger the adjustment. Task-number: QT-5101 Reviewed-by: Sami Merila --- src/gui/kernel/qapplication_s60.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index d3b0e99..b5db3d0 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1518,6 +1518,11 @@ void QSymbianControl::HandleResourceChange(int resourceType) QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); QApplication::sendEvent(qt_desktopWidget, &e); } + // Send resize event to dialogs so they can adjust their position if necessary. + if (qwidget->windowType() & Qt::Dialog) { + QResizeEvent e(qwidget->size(), qwidget->size()); + QApplication::sendEvent(qwidget, &e); + } break; } #endif -- cgit v0.12