summaryrefslogtreecommitdiff
path: root/src/gui/dialogs/qdialog.cpp
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2010-06-30 15:00:11 +0100
committermread <qt-info@nokia.com>2010-07-01 09:34:47 +0100
commitfabf804b147892abb0e8aeb49d1753359ea5e56e (patch)
treeea9d514be08bc64e2848b0a7d1e87f8eaf0a0709 /src/gui/dialogs/qdialog.cpp
parentcb2b4a12ac17adf56074d3630efe4feb50ae0e2b (diff)
downloadqt4-tools-fabf804b147892abb0e8aeb49d1753359ea5e56e.tar.gz
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
Diffstat (limited to 'src/gui/dialogs/qdialog.cpp')
-rw-r--r--src/gui/dialogs/qdialog.cpp21
1 files changed, 14 insertions, 7 deletions
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 <AknUtils.h> // 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