summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-09-20 15:41:42 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-09-21 08:07:58 (GMT)
commit5b12c8736b93c288343d5dbecda7af8fdf264b3e (patch)
tree1cada98e280b5c89fd76e3f47e9b64322d3eea2f /src
parenteb1746a18933d4691fb71bf4ad5de73ded697f40 (diff)
downloadQt-5b12c8736b93c288343d5dbecda7af8fdf264b3e.zip
Qt-5b12c8736b93c288343d5dbecda7af8fdf264b3e.tar.gz
Qt-5b12c8736b93c288343d5dbecda7af8fdf264b3e.tar.bz2
Introduce MenuSoftKey as a standard key to the internal enum.
QMainWindow was using the 'Done' standard softkey to represent the action for the menu bar, but that was obviously wrong and pointed out that one of hte needed standard softkeys was needed. Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp4
-rw-r--r--src/gui/kernel/qsoftkeymanager_p.h1
-rw-r--r--src/gui/widgets/qmainwindow.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 64cffe0..ed6f4c9 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -82,6 +82,9 @@ const char *QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey)
case DoneSoftKey:
softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Done");
break;
+ case MenuSoftKey:
+ softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Options");
+ break;
case CancelSoftKey:
softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Cancel");
break;
@@ -113,6 +116,7 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act
case OkSoftKey:
case SelectSoftKey:
case DoneSoftKey:
+ case MenuSoftKey:
softKeyRole = QAction::PositiveSoftKey;
break;
case CancelSoftKey:
diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h
index 1bc6908..c4bb84d 100644
--- a/src/gui/kernel/qsoftkeymanager_p.h
+++ b/src/gui/kernel/qsoftkeymanager_p.h
@@ -73,6 +73,7 @@ public:
OkSoftKey,
SelectSoftKey,
DoneSoftKey,
+ MenuSoftKey,
CancelSoftKey,
};
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 8bdbba7..227a179 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -118,7 +118,7 @@ void QMainWindowPrivate::init()
iconSize = QSize(metric, metric);
q->setAttribute(Qt::WA_Hover);
#ifdef QT_SOFTKEYS_ENABLED
- menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::DoneSoftKey, q);
+ menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q);
#endif
}