diff -r 5dc02b23752f -r 3e2da88830cd src/gui/dialogs/qdialog.cpp --- a/src/gui/dialogs/qdialog.cpp Tue Jul 06 15:10:48 2010 +0300 +++ b/src/gui/dialogs/qdialog.cpp Wed Aug 18 10:37:55 2010 +0300 @@ -67,12 +67,12 @@ #elif defined(Q_OS_SYMBIAN) # include "qfiledialog.h" # include "qfontdialog.h" -# include "qcolordialog.h" # include "qwizard.h" +# include "private/qt_s60_p.h" #endif #if defined(Q_WS_S60) -#include "private/qt_s60_p.h" +#include // AknLayoutUtils #endif #ifndef SPI_GETSNAPTODEFBUTTON @@ -393,7 +393,7 @@ 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 +413,7 @@ 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 +423,7 @@ setWindowState(state); } } + // TODO is Symbian, non-S60 behaviour required? #endif return result; } @@ -527,14 +528,19 @@ #endif //QT_NO_MENUBAR #endif //Q_WS_WINCE_WM + bool showSystemDialogFullScreen = false; #ifdef Q_OS_SYMBIAN if (qobject_cast(this) || qobject_cast(this) || - qobject_cast(this) || qobject_cast(this)) - showMaximized(); - else + qobject_cast(this)) { + showSystemDialogFullScreen = true; + } #endif // Q_OS_SYMBIAN - show(); + if (showSystemDialogFullScreen) { + setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint); + setWindowState(Qt::WindowFullScreen); + } + show(); #ifdef Q_WS_MAC d->mac_nativeDialogModalHelp(); @@ -818,8 +824,8 @@ return; #endif -#ifdef Q_WS_S60 - if (s60AdjustedPosition()) +#ifdef Q_OS_SYMBIAN + if (symbianAdjustedPosition()) //dialog has already been positioned return; #endif @@ -887,13 +893,12 @@ 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 QSize mainAreaSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); - const int statusPaneHeight = (S60->screenHeightInPixels - mainAreaSize.height())>>1; const bool doS60Positioning = !(isFullScreen()||isMaximized()); if (doS60Positioning) { // naive way to deduce screen orientation @@ -937,6 +942,10 @@ move(p); } return doS60Positioning; +#else + // TODO - check positioning requirement for Symbian, non-s60 + return false; +#endif } #endif