diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-12-20 09:47:02 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-12-20 09:47:02 (GMT) |
commit | 10c90522d6e3807baac3c4bfca4eedc51a4251f5 (patch) | |
tree | 92005b547e3b92eb9e640fae8c78fdcdc13b6dd9 /src/gui/dialogs | |
parent | 64e1f888586f2c988b08bcc93579990e970b7206 (diff) | |
parent | 97b039438bc31bb420138d72549372adb1244dc8 (diff) | |
download | Qt-10c90522d6e3807baac3c4bfca4eedc51a4251f5.zip Qt-10c90522d6e3807baac3c4bfca4eedc51a4251f5.tar.gz Qt-10c90522d6e3807baac3c4bfca4eedc51a4251f5.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
demos/declarative/minehunt/minehunt.pro
src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
src/plugins/phonon/mmf/mmf.pro
src/s60installs/s60installs.pro
tests/auto/qapplication/test/test.pro
tests/auto/qgraphicsview/tst_qgraphicsview.cpp
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 13 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 8 | ||||
-rw-r--r-- | src/gui/dialogs/qinputdialog.cpp | 2 |
3 files changed, 16 insertions, 7 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 90a15b0..0f98b56 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -901,15 +901,13 @@ bool QDialog::symbianAdjustedPosition() QPoint p; const bool doS60Positioning = !(isFullScreen()||isMaximized()); if (doS60Positioning) { + QPoint oldPos = pos(); // naive way to deduce screen orientation if (S60->screenHeightInPixels > S60->screenWidthInPixels) { int cbaHeight; - const CEikButtonGroupContainer* bgContainer = S60->buttonGroupContainer(); - if (!bgContainer) { - cbaHeight = 0; - } else { - cbaHeight = qt_TSize2QSize(bgContainer->Size()).height(); - } + TRect rect; + AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, rect); + cbaHeight = rect.Height(); p.setY(S60->screenHeightInPixels - height() - cbaHeight); p.setX(0); } else { @@ -939,7 +937,8 @@ bool QDialog::symbianAdjustedPosition() p.setX(qMax(0,S60->screenWidthInPixels - width())); } } - move(p); + if (oldPos != p || p.y() < 0) + move(p); } return doS60Positioning; #else diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 6c1d7f6..a233d4f 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -726,6 +726,14 @@ bool QFileDialogPrivate::setVisible_sys(bool visible) if (!visible == q->isHidden()) return false; + if (q->windowFlags() & Qt::WindowStaysOnTopHint) { + // The native file dialog tries all it can to stay + // on the NSModalPanel level. And it might also show + // its own "create directory" dialog that we cannot control. + // So we need to use the non-native version in this case... + return false; + } + #ifndef QT_MAC_USE_COCOA return visible ? showCarbonNavServicesDialog() : hideCarbonNavServicesDialog(); #else diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index 9e4b9b6..1724316 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -234,6 +234,8 @@ void QInputDialogPrivate::ensureLayout() //we want to let the input dialog grow to available size on Symbian. #ifndef Q_OS_SYMBIAN mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); +#else + label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); #endif mainLayout->addWidget(label); mainLayout->addWidget(inputWidget); |