summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsoftkeymanager_p.h
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2010-03-23 08:36:22 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2010-03-23 08:37:38 (GMT)
commit262e98f9a29385f99cd6f768632264e0b621dc01 (patch)
tree3c8d0745912d25d9ce0fcc5e72a4bf33a298c626 /src/gui/kernel/qsoftkeymanager_p.h
parentae3d95f872c8bd2e192c58d7c7c830a3d2e4bc43 (diff)
downloadQt-262e98f9a29385f99cd6f768632264e0b621dc01.zip
Qt-262e98f9a29385f99cd6f768632264e0b621dc01.tar.gz
Qt-262e98f9a29385f99cd6f768632264e0b621dc01.tar.bz2
Fixed S60 softkey implementation to use popup/modal dialog softkeys.
Previously softkey implementation assumed that source for softkey actions is focused widget or activewindow if there is no focused widget. Since for example pop-up menu does not take focus immediately in touch enabled devices, the underlying widget softkeys were visible and usable when menu was open. This lead to problem that underlying widget could be interacted via softkeys when popup menu was open. For example as reported in QTBUG-8688, it was possible to close the underlying filedialog from which the currently active context menu was launched. It was also possible to open "Options" menu of underlying widget when context menu was open, leading to situation where several context menus could be launched via "Actions" item of "Options" menu. This was reported as an issue: QTBUG-6167 In addition when user started navigating in context menu via keypad, the menu got focus and softkeys changed to partially correct. Only partially correct, since context menu "Select" action and "Options" action had same priority and both associated to LSK. In addition the context menu action "Cancel" associated to RSK was set to invisible, meaning that it was also disabled and appeared in sofkeys as dimmed. All of these issues were fixed by making making the popup and modal dialogs highest priority softkey source. In case the focused widget is inside popup or modal dialog it is being used as an initial softkey source. In addition the softkeys created with QSoftKeyManager::createAction or QSoftKeyManager::createKeyedAction are now by default invisible i.e. not visible in context menu and have special property set to make them still normally enabled in softkeys. Task-number: QTBUG-6167 Task-number: QTBUG-8688 Task-number: QTBUG-9144 Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui/kernel/qsoftkeymanager_p.h')
-rw-r--r--src/gui/kernel/qsoftkeymanager_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h
index a6fe17e..a5b258b 100644
--- a/src/gui/kernel/qsoftkeymanager_p.h
+++ b/src/gui/kernel/qsoftkeymanager_p.h
@@ -63,7 +63,8 @@ QT_BEGIN_NAMESPACE
class QSoftKeyManagerPrivate;
-const char MENU_ACTION_PROPERTY[] = "_q_menuaction";
+const char MENU_ACTION_PROPERTY[] = "_q_menuAction";
+const char FORCE_ENABLED_PROPERTY[] = "_q_forceEnabledInSoftkeys";
class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
{
@@ -88,6 +89,8 @@ public:
static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
static QString standardSoftKeyText(StandardSoftKey standardKey);
+ static void setForceEnabledInSoftkeys(QAction *action);
+ static bool isForceEnabledInSofkeys(QAction *action);
protected:
bool event(QEvent *e);