From c360fbcd6c9276b8a3fa8a200fa489b7b69e3aaa Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Mon, 22 Oct 2012 13:48:59 +0200 Subject: Do the actual removal of the Soft Keys API and related code In addition to the actual removal of the softkeys API in QAction, this commit removes some enums related to the softkeys feature: Qt::WA_MergeSoftkeys Qt::WA_MergeSoftkeysRecursively It also removes some "zombie" enums: Qt::WindowSoftkeysVisibleHint = 0x40000000, Qt::WindowSoftkeysRespondHint = 0x80000000, (The only implementation that used these were removed when qapplication_s60.cpp and qwidget_s60.cpp were removed.) Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614 Reviewed-by: Lars Knoll Reviewed-by: Janne Anttila Reviewed-by: J-P Nurmi --- src/widgets/widgets/qmenu.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/widgets/widgets/qmenu.cpp') diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index ffded7839f..fe7e444e86 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -69,7 +69,6 @@ #include "qpushbutton.h" #include #include -#include #include QT_BEGIN_NAMESPACE @@ -158,15 +157,6 @@ void QMenuPrivate::init() QObject::connect(platformMenu, SIGNAL(aboutToShow()), q, SIGNAL(aboutToShow())); QObject::connect(platformMenu, SIGNAL(aboutToHide()), q, SIGNAL(aboutToHide())); } - -#ifdef QT_SOFTKEYS_ENABLED - selectAction = QSoftKeyManager::createKeyedAction(QSoftKeyManager::SelectSoftKey, Qt::Key_Select, q); - cancelAction = QSoftKeyManager::createKeyedAction(QSoftKeyManager::CancelSoftKey, Qt::Key_Back, q); - selectAction->setPriority(QAction::HighPriority); - cancelAction->setPriority(QAction::HighPriority); - q->addAction(selectAction); - q->addAction(cancelAction); -#endif } int QMenuPrivate::scrollerHeight() const @@ -1674,12 +1664,6 @@ void QMenu::clear() QList acts = actions(); for(int i = 0; i < acts.size(); i++) { -#ifdef QT_SOFTKEYS_ENABLED - Q_D(QMenu); - // Lets not touch to our internal softkey actions - if(acts[i] == d->selectAction || acts[i] == d->cancelAction) - continue; -#endif removeAction(acts[i]); if (acts[i]->parent() == this && acts[i]->d_func()->widgets.isEmpty()) delete acts[i]; @@ -2382,13 +2366,6 @@ QMenu::event(QEvent *e) e->accept(); } return true; -#endif -#ifdef QT_SOFTKEYS_ENABLED - case QEvent::LanguageChange: { - d->selectAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::SelectSoftKey)); - d->cancelAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::CancelSoftKey)); - } - break; #endif default: break; -- cgit v1.2.3