From 53d1557f1ef4969bd5c8d68b82a0151ae03f004a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 6 Jun 2011 12:21:37 +0200 Subject: Have -small-screen enabled in certain examples on Symbian always. --- demos/deform/main.cpp | 4 ++++ demos/pathstroke/main.cpp | 4 ++++ examples/draganddrop/fridgemagnets/main.cpp | 5 +++++ examples/script/context2d/main.cpp | 5 +++++ examples/widgets/wiggly/main.cpp | 4 ++++ 5 files changed, 22 insertions(+) diff --git a/demos/deform/main.cpp b/demos/deform/main.cpp index 70e4bec..21ce7fb 100644 --- a/demos/deform/main.cpp +++ b/demos/deform/main.cpp @@ -50,7 +50,11 @@ int main(int argc, char **argv) QApplication app(argc, argv); +#ifdef Q_OS_SYMBIAN + bool smallScreen = true; +#else bool smallScreen = QApplication::arguments().contains("-small-screen"); +#endif PathDeformWidget deformWidget(0, smallScreen); diff --git a/demos/pathstroke/main.cpp b/demos/pathstroke/main.cpp index 2e9153f..6d688c3 100644 --- a/demos/pathstroke/main.cpp +++ b/demos/pathstroke/main.cpp @@ -48,7 +48,11 @@ int main(int argc, char **argv) QApplication app(argc, argv); +#ifdef Q_OS_SYMBIAN + bool smallScreen = true; +#else bool smallScreen = QApplication::arguments().contains("-small-screen"); +#endif PathStrokeWidget pathStrokeWidget(smallScreen); QStyle *arthurStyle = new ArthurStyle(); diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp index 1166abb..e87ef5b 100644 --- a/examples/draganddrop/fridgemagnets/main.cpp +++ b/examples/draganddrop/fridgemagnets/main.cpp @@ -51,7 +51,12 @@ int main(int argc, char *argv[]) #endif DragWidget window; +#ifdef Q_OS_SYMBIAN + bool smallScreen = true; +#else bool smallScreen = QApplication::arguments().contains("-small-screen"); +#endif + if (smallScreen) window.showFullScreen(); else diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp index 3d56910..20df178 100644 --- a/examples/script/context2d/main.cpp +++ b/examples/script/context2d/main.cpp @@ -48,7 +48,12 @@ int main(int argc, char **argv) QApplication app(argc, argv); Window win; +#ifdef Q_OS_SYMBIAN + bool smallScreen = true; +#else bool smallScreen = QApplication::arguments().contains("-small-screen"); +#endif + if (!smallScreen) { win.show(); } else { diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp index 91cd1b8..7ba6d36 100644 --- a/examples/widgets/wiggly/main.cpp +++ b/examples/widgets/wiggly/main.cpp @@ -45,7 +45,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); +#ifdef Q_OS_SYMBIAN + bool smallScreen = true; +#else bool smallScreen = QApplication::arguments().contains("-small-screen"); +#endif Dialog dialog(0, smallScreen); -- cgit v0.12 From 40191387a77552b2ba6df547b87de040e126220a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 6 Jun 2011 13:53:36 +0200 Subject: Close context menus during orientation change. Make non-native QMenus, i.e. context menus, work like in Avkon. Reviewed-by: Miikka Heikkinen Reviewed-by: Sami Merila Task-number: QTBUG-19656 --- src/gui/kernel/qapplication_s60.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6d1b96f..d3b0e99 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -2243,6 +2243,7 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent #if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS) case EEventDisplayChanged: #endif + { if (callSymbianEventFilters(symbianEvent)) return 1; if (S60) @@ -2254,6 +2255,12 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent QResizeEvent e(qt_desktopWidget->size(), oldSize); QApplication::sendEvent(qt_desktopWidget, &e); } + // Close non-native QMenus (that should act like context menus, i.e. close + // automatically when the orientation changes). + QMenu *activeMenu = qobject_cast(QApplication::activePopupWidget()); + if (activeMenu) + activeMenu->close(); + } return 0; // Propagate to CONE case EEventWindowVisibilityChanged: if (controlInMap) { -- cgit v0.12 From 34b888b2c6455cdcd4f931f6a5a038636cf951eb Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 7 Jun 2011 11:08:59 +0300 Subject: KERN-EXEC 3 panic in QCoeFepInputContext::translateInputWidget() There is no check if graphics view pointer is null in the SLOT function translateInputWidget(). Task-number: QTBUG-19734 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 67330e2..f057e0a 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -868,6 +868,8 @@ void QCoeFepInputContext::ensureInputCapabilitiesChanged() void QCoeFepInputContext::translateInputWidget() { QGraphicsView *gv = qobject_cast(S60->splitViewLastWidget); + if (!gv) + return; QRect splitViewRect = qt_TRect2QRect(static_cast(S60->appUi())->ClientRect()); QRectF cursor = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF(); -- cgit v0.12