summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qsoftkeystack_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qsoftkeystack_s60.cpp')
-rw-r--r--src/gui/widgets/qsoftkeystack_s60.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/widgets/qsoftkeystack_s60.cpp b/src/gui/widgets/qsoftkeystack_s60.cpp
index 9e90fdf..a6b885e 100644
--- a/src/gui/widgets/qsoftkeystack_s60.cpp
+++ b/src/gui/widgets/qsoftkeystack_s60.cpp
@@ -90,15 +90,22 @@ void QSoftKeyStackPrivate::setNativeSoftKeys()
if (softKeyAction->role() == QSoftKeyAction::Menu) {
nativeContainer->SetCommandL(softKeyAction->nativePosition(), EAknSoftkeyOptions, *text);
} else {
- nativeContainer->SetCommandL(softKeyAction->nativePosition(), SOFTKEYSTART + softKeyAction->qtContextKey(), *text);
+ nativeContainer->SetCommandL(softKeyAction->nativePosition(), SOFTKEYSTART + softKeyAction->qtContextKey()-Qt::Key_Context1, *text);
}
CleanupStack::PopAndDestroy();
}
}
}
-void QSoftKeyStack::handleSoftKeyPress(int command)
+void QSoftKeyStackPrivate::handleSoftKeyPress(int command)
{
- // Do the magic, here.
- // Map the command back to actual softkey on the top of the stack and handle it
+ const QSoftkeySet top = softKeyStack.top();
+ int index = command-SOFTKEYSTART;
+ if( index<0 || index>=top.count()){
+ // ### FIX THIS, add proper error handling, now fail quietly
+ return;
+ }
+
+ top.at(index)->activate(QAction::Trigger);
}
+