summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-10 15:18:28 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-10 15:18:28 (GMT)
commit7e7bfc31faf75b433b3bcf3f7d968cfbba870452 (patch)
tree3272af0770a39910db4155f7f7a86b1be1b3b061 /src/gui
parent1f88e7df38aa890cf893cf7f5b60546dbd922bdf (diff)
parent6d44daddab9f36fd8c34bb3776c0fb0d93635e6e (diff)
downloadQt-7e7bfc31faf75b433b3bcf3f7d968cfbba870452.zip
Qt-7e7bfc31faf75b433b3bcf3f7d968cfbba870452.tar.gz
Qt-7e7bfc31faf75b433b3bcf3f7d968cfbba870452.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed dialog resize not to move the dialog for Symbian. Fix SDP files are not supported. Fix build break caused by undefined symbol SetDialogPreference Renamed test benchmark targets. Added check for null pointer in qt_vg_unregister_pixmap. Add '.' dir as the first include directory in Symbian Enabled some examples by default in Symbian builds Added forwarding headers for qplatformdefs.h in Symbian mkspecs QUnixPrintWidget should not be declared in Symbian Fix sqlite3_v9.2.zip to export sqlite3.iby to correct location. Export qtdemoapps.iby to proper location Added some missing IBY export paths to platform_path.prf
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogs/qdialog.cpp11
-rw-r--r--src/gui/dialogs/qprintdialog.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/kernel/qwidget_s60.cpp7
4 files changed, 17 insertions, 5 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index d86d63e..d8ac9a8 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -415,8 +415,15 @@ bool QDialog::event(QEvent *e)
result = true;
}
#else
- if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize ))
- adjustPosition(parentWidget());
+ if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) {
+ if (!testAttribute(Qt::WA_Moved)) {
+ Qt::WindowStates state = windowState();
+ adjustPosition(parentWidget());
+ setAttribute(Qt::WA_Moved, false); // not really an explicit position
+ if (state != windowState())
+ setWindowState(state);
+ }
+ }
#endif
return result;
}
diff --git a/src/gui/dialogs/qprintdialog.h b/src/gui/dialogs/qprintdialog.h
index ecd50c1..94177ea 100644
--- a/src/gui/dialogs/qprintdialog.h
+++ b/src/gui/dialogs/qprintdialog.h
@@ -56,7 +56,7 @@ class QPrintDialogPrivate;
class QPushButton;
class QPrinter;
-#if defined (Q_OS_UNIX) && !defined(QTOPIA_PRINTDIALOG) && !defined(Q_WS_MAC)
+#if defined (Q_OS_UNIX) && !defined(QTOPIA_PRINTDIALOG) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN)
class QUnixPrintWidgetPrivate;
class Q_GUI_EXPORT QUnixPrintWidget : public QWidget
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 395ceca..79b2bff 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1034,7 +1034,7 @@ void QSymbianControl::HandleResourceChange(int resourceType)
qwidget->adjustSize();
qwidget->setAttribute(Qt::WA_Resized, false); //not a user resize
}
- if (!qwidget->testAttribute(Qt::WA_Moved)) {
+ if (!qwidget->testAttribute(Qt::WA_Moved) && qwidget->windowType() != Qt::Dialog) {
TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
SetPosition(r.iTl);
qwidget->setAttribute(Qt::WA_Moved, false); // not really an explicit position
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 7fb21d2..81c4198 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1052,6 +1052,8 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
return;
if (isWindow()) {
+ const bool wasResized = testAttribute(Qt::WA_Resized);
+ const bool wasMoved = testAttribute(Qt::WA_Moved);
QSymbianControl *window = static_cast<QSymbianControl *>(effectiveWinId());
if (window && newstate & Qt::WindowMinimized) {
@@ -1090,7 +1092,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
createWinId();
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
// Ensure the initial size is valid, since we store it as normalGeometry below.
- if (!testAttribute(Qt::WA_Resized) && !isVisible())
+ if (!wasResized && !isVisible())
adjustSize();
QTLWExtra *top = d->topData();
@@ -1105,6 +1107,9 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
//restore normal geometry
top->normalGeometry = normalGeometry;
+
+ setAttribute(Qt::WA_Resized, wasResized);
+ setAttribute(Qt::WA_Moved, wasMoved);
}
data->window_state = newstate;