From 7f9e29a79442719fdf1d96ebd046c7155c33bb68 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Sun, 20 Sep 2009 20:15:37 +0200 Subject: Make the 'softkeys' example compile again after softkey changes. Change to the new API and remove one of the actions since it has no equivalent in the new framework. Reviewed-by: Alessandro Portale --- examples/widgets/softkeys/softkeys.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index 5d624ef..69b4941 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -50,20 +50,17 @@ MainWindow::MainWindow(QWidget *parent) // Create text editor and set softkeys to it textEditor= new QTextEdit(tr("Navigate in UI to see context sensitive softkeys in action"), this); - QAction* menu = new QAction(tr("Menu"), this); - menu->setSoftKeyRole(QAction::MenuSoftKey); QAction* clear = new QAction(tr("Clear"), this); - clear->setSoftKeyRole(QAction::CancelSoftKey); + clear->setSoftKeyRole(QAction::NegativeSoftKey); - textEditor->addAction(menu); textEditor->addAction(clear); ok = new QAction(tr("Ok"), this); - ok->setSoftKeyRole(QAction::OkSoftKey); + ok->setSoftKeyRole(QAction::PositiveSoftKey); connect(ok, SIGNAL(triggered()), this, SLOT(okPressed())); cancel = new QAction(tr("Cancel"), this); - cancel->setSoftKeyRole(QAction::CancelSoftKey); + cancel->setSoftKeyRole(QAction::NegativeSoftKey); connect(cancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); infoLabel = new QLabel(tr(""), this); -- cgit v0.12