They are defined in the 'Qt' namespace. Fixes the following compiler errors after a quick conversion with 'qt3to4', which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2. scripts/kconfig/qconf.cc: In member function 'virtual void ConfigLineEdit::keyPressEvent(QKeyEvent*)': scripts/kconfig/qconf.cc:311: error: 'Key_Escape' was not declared in this scope scripts/kconfig/qconf.cc:313: error: 'Key_Return' was not declared in this scope scripts/kconfig/qconf.cc:314: error: 'Key_Enter' was not declared in this scope scripts/kconfig/qconf.cc: In member function 'virtual void ConfigList::keyPressEvent(QKeyEvent*)': scripts/kconfig/qconf.cc:653: error: 'Key_Escape' was not declared in this scope scripts/kconfig/qconf.cc:666: error: 'Key_Return' was not declared in this scope scripts/kconfig/qconf.cc:667: error: 'Key_Enter' was not declared in this scope scripts/kconfig/qconf.cc:681: error: 'Key_Space' was not declared in this scope scripts/kconfig/qconf.cc:684: error: 'Key_N' was not declared in this scope scripts/kconfig/qconf.cc:687: error: 'Key_M' was not declared in this scope scripts/kconfig/qconf.cc:690: error: 'Key_Y' was not declared in this scope scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()': scripts/kconfig/qconf.cc:1329: error: 'CTRL' was not declared in this scope scripts/kconfig/qconf.cc:1329: error: 'Key_Q' was not declared in this scope scripts/kconfig/qconf.cc:1331: error: 'Key_L' was not declared in this scope scripts/kconfig/qconf.cc:1333: error: 'Key_S' was not declared in this scope scripts/kconfig/qconf.cc:1340: error: 'Key_F' was not declared in this scope
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -297,10 +297,10 @@ void ConfigLineEdit::show(ConfigItem* i) · 296 unmodified lines | ||
| 297 | 297 | void ConfigLineEdit::keyPressEvent(QKeyEvent* e) |
| 298 | 298 | { |
| 299 | 299 | switch (e->key()) { |
| 300 | − case Key_Escape: | |
| 300 | + case Qt::Key_Escape: | |
| 301 | 301 | break; |
| 302 | − case Key_Return: | |
| 303 | − case Key_Enter: | |
| 302 | + case Qt::Key_Return: | |
| 303 | + case Qt::Key_Enter: | |
| 304 | 304 | sym_set_string_value(item->menu->sym, text().latin1()); |
| 305 | 305 | parent()->updateList(item); |
| 306 | 306 | break; |
| @@ -639,7 +639,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) · 332 unmodified lines | ||
| 639 | 639 | struct menu *menu; |
| 640 | 640 | enum prop_type type; |
| 641 | 641 | |
| 642 | − if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) { | |
| 642 | + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { | |
| 643 | 643 | emit parentSelected(); |
| 644 | 644 | ev->accept(); |
| 645 | 645 | return; |
| @@ -652,8 +652,8 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) · 6 unmodified lines | ||
| 652 | 652 | item = (ConfigItem*)i; |
| 653 | 653 | |
| 654 | 654 | switch (ev->key()) { |
| 655 | − case Key_Return: | |
| 656 | − case Key_Enter: | |
| 655 | + case Qt::Key_Return: | |
| 656 | + case Qt::Key_Enter: | |
| 657 | 657 | if (item->goParent) { |
| 658 | 658 | emit parentSelected(); |
| 659 | 659 | break; |
| @@ -667,16 +667,16 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) · 7 unmodified lines | ||
| 667 | 667 | emit menuSelected(menu); |
| 668 | 668 | break; |
| 669 | 669 | } |
| 670 | − case Key_Space: | |
| 670 | + case Qt::Key_Space: | |
| 671 | 671 | changeValue(item); |
| 672 | 672 | break; |
| 673 | − case Key_N: | |
| 673 | + case Qt::Key_N: | |
| 674 | 674 | setValue(item, no); |
| 675 | 675 | break; |
| 676 | − case Key_M: | |
| 676 | + case Qt::Key_M: | |
| 677 | 677 | setValue(item, mod); |
| 678 | 678 | break; |
| 679 | − case Key_Y: | |
| 679 | + case Qt::Key_Y: | |
| 680 | 680 | setValue(item, yes); |
| 681 | 681 | break; |
| 682 | 682 | default: |
| @@ -1315,18 +1315,18 @@ ConfigMainWindow::ConfigMainWindow(void) · 632 unmodified lines | ||
| 1315 | 1315 | backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this); |
| 1316 | 1316 | connect(backAction, SIGNAL(activated()), SLOT(goBack())); |
| 1317 | 1317 | backAction->setEnabled(FALSE); |
| 1318 | − QAction *quitAction = new QAction("Quit", _("&Quit"), CTRL+Key_Q, this); | |
| 1318 | + QAction *quitAction = new QAction("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this); | |
| 1319 | 1319 | connect(quitAction, SIGNAL(activated()), SLOT(close())); |
| 1320 | − QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this); | |
| 1320 | + QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this); | |
| 1321 | 1321 | connect(loadAction, SIGNAL(activated()), SLOT(loadConfig())); |
| 1322 | − saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this); | |
| 1322 | + saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this); | |
| 1323 | 1323 | connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); |
| 1324 | 1324 | conf_set_changed_callback(conf_changed); |
| 1325 | 1325 | // Set saveAction's initial state |
| 1326 | 1326 | conf_changed(); |
| 1327 | 1327 | QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this); |
| 1328 | 1328 | connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); |
| 1329 | − QAction *searchAction = new QAction("Find", _("&Find"), CTRL+Key_F, this); | |
| 1329 | + QAction *searchAction = new QAction("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this); | |
| 1330 | 1330 | connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); |
| 1331 | 1331 | QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this); |
| 1332 | 1332 | connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); |