From fabf804b147892abb0e8aeb49d1753359ea5e56e Mon Sep 17 00:00:00 2001 From: mread Date: Wed, 30 Jun 2010 15:00:11 +0100 Subject: Avkon removal configured with -no-s60 Avkon dependencies can be configured out with the -no-s60 configure flag, conversely Qt on Symbian will use Avkon if -s60 is configured. These changes are intended to keep or introduce binary compatibility between the s60 and no-s60 configurations. To do this, it has been necessary to introduce stub equivalents of the CAknAppUi related classes into the no-s60 configuration, and override all Avkon framework virtual functions in the QS60Main... classes. Other than that, these changes are mostly just correcting the use of the Q_WS_S60 flag so that it only refers to Avkon dependencies. Reviewed-by: Sami Merila --- src/gui/dialogs/qdialog.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/gui/dialogs/qdialog.cpp') diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index c2184f2602..a2adb05a97 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -71,8 +71,9 @@ extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp # include "qwizard.h" #endif -#if defined(Q_WS_S60) #include "private/qt_s60_p.h" +#if defined(Q_WS_S60) +#include // AknLayoutUtils #endif #ifndef SPI_GETSNAPTODEFBUTTON @@ -393,7 +394,7 @@ void QDialogPrivate::resetModalitySetByOpen() resetModalityTo = -1; } -#if defined(Q_WS_WINCE) || defined(Q_WS_S60) +#if defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN) #ifdef Q_WS_WINCE_WM void QDialogPrivate::_q_doneAction() { @@ -413,7 +414,7 @@ bool QDialog::event(QEvent *e) accept(); result = true; } -#else +#elif defined(Q_WS_S60) if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) { if (!testAttribute(Qt::WA_Moved)) { Qt::WindowStates state = windowState(); @@ -423,6 +424,7 @@ bool QDialog::event(QEvent *e) setWindowState(state); } } + // TODO is Symbian, non-S60 behaviour required? #endif return result; } @@ -823,8 +825,8 @@ void QDialog::adjustPosition(QWidget* w) return; #endif -#ifdef Q_WS_S60 - if (s60AdjustedPosition()) +#ifdef Q_OS_SYMBIAN + if (symbianAdjustedPosition()) //dialog has already been positioned return; #endif @@ -892,10 +894,11 @@ void QDialog::adjustPosition(QWidget* w) move(p); } -#if defined(Q_WS_S60) +#if defined(Q_OS_SYMBIAN) /*! \internal */ -bool QDialog::s60AdjustedPosition() +bool QDialog::symbianAdjustedPosition() { +#if defined(Q_WS_S60) QPoint p; const bool doS60Positioning = !(isFullScreen()||isMaximized()); if (doS60Positioning) { @@ -940,6 +943,10 @@ bool QDialog::s60AdjustedPosition() move(p); } return doS60Positioning; +#else + // TODO - check positioning requirement for Symbian, non-s60 + return false; +#endif } #endif -- cgit v1.2.1