From e11e25b779c346e67c2f00acb8ecdcf022e32c8d Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 12 Nov 2009 00:35:31 +0100 Subject: Build without QT_KEYPAD_NAVIGATION There is actually not much of a point to run a keypadnavigation test without QT_KEYPAD_NAVIGATION being enabled. But let's at least build the app. Reviewed-By: TrustMe --- tests/manual/keypadnavigation/keypadnavigation.ui | 4 ++-- tests/manual/keypadnavigation/main.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/manual/keypadnavigation/keypadnavigation.ui b/tests/manual/keypadnavigation/keypadnavigation.ui index 039889b..13e257d 100644 --- a/tests/manual/keypadnavigation/keypadnavigation.ui +++ b/tests/manual/keypadnavigation/keypadnavigation.ui @@ -1155,7 +1155,7 @@ As a reward you can try out the QDial, below. - + Navigation mode @@ -1166,7 +1166,7 @@ As a reward you can try out the QDial, below. - + diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp index d1cc8a7..84b3d78 100644 --- a/tests/manual/keypadnavigation/main.cpp +++ b/tests/manual/keypadnavigation/main.cpp @@ -70,6 +70,7 @@ public: } connect(&m_layoutSignalMapper, SIGNAL(mapped(QWidget*)), ui->m_stackWidget, SLOT(setCurrentWidget(QWidget*))); +#ifdef QT_KEYPAD_NAVIGATION const struct { QObject *action; Qt::NavigationMode mode; @@ -85,6 +86,9 @@ public: m_modeSignalMapper.setMapping(modeMappings[i].action, int(modeMappings[i].mode)); } connect(&m_modeSignalMapper, SIGNAL(mapped(int)), SLOT(setNavigationMode(int))); +#else // QT_KEYPAD_NAVIGATION + ui->m_menuNavigation_mode->deleteLater(); +#endif // QT_KEYPAD_NAVIGATION const struct { QObject *button; @@ -112,10 +116,12 @@ public: } protected slots: +#ifdef QT_KEYPAD_NAVIGATION void setNavigationMode(int mode) { QApplication::setNavigationMode(Qt::NavigationMode(mode)); } +#endif // QT_KEYPAD_NAVIGATION void openDialog(int dialog) { @@ -163,7 +169,9 @@ private: Ui_KeypadNavigation *ui; QSignalMapper m_layoutSignalMapper; +#ifdef QT_KEYPAD_NAVIGATION QSignalMapper m_modeSignalMapper; +#endif // QT_KEYPAD_NAVIGATION QSignalMapper m_dialogSignalMapper; }; -- cgit v0.12