diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-06 11:13:20 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-06 11:13:20 (GMT) |
commit | 440b48c8601e8a4bb31858c8c5521a0ab8961ef8 (patch) | |
tree | e27c454be53a4c32906e9aafaf88e07e50f7c8f9 | |
parent | 5df9e8ced092f6f61b712d6f8ffaea7bc0041222 (diff) | |
parent | f8f83e3a9177531169c3c2b525c868b6f4016381 (diff) | |
download | Qt-440b48c8601e8a4bb31858c8c5521a0ab8961ef8.zip Qt-440b48c8601e8a4bb31858c8c5521a0ab8961ef8.tar.gz Qt-440b48c8601e8a4bb31858c8c5521a0ab8961ef8.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 modal dialog not to have automatic "Exit" right softkey in S60.
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 1 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_common_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_s60.cpp | 13 |
3 files changed, 5 insertions, 12 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 923144a..23f1481 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -242,6 +242,7 @@ bool QSoftKeyManager::handleUpdateSoftKeys() d->requestedSoftKeyActions.clear(); bool recursiveMerging = false; QWidget *source = softkeySource(NULL, recursiveMerging); + d->initialSoftKeySource = source; while (source) { if (appendSoftkeys(*source, level)) ++level; diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h index 460d0dc..04ddf7d 100644 --- a/src/gui/kernel/qsoftkeymanager_common_p.h +++ b/src/gui/kernel/qsoftkeymanager_common_p.h @@ -70,6 +70,7 @@ protected: static QSoftKeyManager *self; QHash<QAction*, Qt::Key> keyedActions; QMultiHash<int, QAction*> requestedSoftKeyActions; + QWidget *initialSoftKeySource; }; @@ -79,4 +80,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QSOFTKEYMANAGER_COMMON_P_H
\ No newline at end of file +#endif // QSOFTKEYMANAGER_COMMON_P_H diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index 9812d72..7d643c2 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -312,17 +312,8 @@ bool QSoftKeyManagerPrivateS60::setMiddleSoftkey(CEikButtonGroupContainer &cba) bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba) { if (!setSoftkey(cba, QAction::NegativeSoftKey, RSK_POSITION)) { - Qt::WindowType windowType = Qt::Window; - QAction *action = requestedSoftKeyActions.value(0); - if (action) { - QWidget *actionParent = action->parentWidget(); - Q_ASSERT_X(actionParent, Q_FUNC_INFO, "No parent set for softkey action!"); - - QWidget *actionWindow = actionParent->window(); - Q_ASSERT_X(actionWindow, Q_FUNC_INFO, "Softkey action does not have window!"); - windowType = actionWindow->windowType(); - } - + const Qt::WindowType windowType = initialSoftKeySource + ? initialSoftKeySource->window()->windowType() : Qt::Window; if (windowType != Qt::Dialog && windowType != Qt::Popup) { QString text(QSoftKeyManager::tr("Exit")); TPtrC nativeText = qt_QString2TPtrC(text); |