diff options
author | Alessandro Portale <aportale@trolltech.com> | 2009-11-11 23:35:31 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2009-11-17 20:31:17 (GMT) |
commit | e11e25b779c346e67c2f00acb8ecdcf022e32c8d (patch) | |
tree | aeb3a521c5b510863b2e2ed24ac7c1ea95cede08 /tests | |
parent | 2fb8eee9324dbaed07a1dbab4702f4ffa2e356b1 (diff) | |
download | Qt-e11e25b779c346e67c2f00acb8ecdcf022e32c8d.zip Qt-e11e25b779c346e67c2f00acb8ecdcf022e32c8d.tar.gz Qt-e11e25b779c346e67c2f00acb8ecdcf022e32c8d.tar.bz2 |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/keypadnavigation/keypadnavigation.ui | 4 | ||||
-rw-r--r-- | 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.</string> <addaction name="m_actionLayoutChaos"/> <addaction name="m_actionLayoutDialogs"/> </widget> - <widget class="QMenu" name="menuNavigation_mode"> + <widget class="QMenu" name="m_menuNavigation_mode"> <property name="title"> <string>Navigation mode</string> </property> @@ -1166,7 +1166,7 @@ As a reward you can try out the QDial, below.</string> <addaction name="m_actionModeCursorForceVisible"/> </widget> <addaction name="menuUi_layout"/> - <addaction name="menuNavigation_mode"/> + <addaction name="m_menuNavigation_mode"/> </widget> <action name="m_actionLayoutVerticalSimple"> <property name="text"> 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; }; |