aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMarkus Heidelberg <markus.heidelberg@web.de>2009-05-17 19:36:51 -0400
committerSam Ravnborg <sam@ravnborg.org>2009-06-09 16:37:50 -0400
commitfbb86374445d97072dd994f1a4adf023bfd1e86e (patch)
treef9ba36643b5a2a2d5fa3f44cd95e78b32a5c9e38 /scripts/kconfig
parent7298b936017859fce4906e38f485c131520fe857 (diff)
kconfig qconf: add namespace for use of Key_ enum values
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 Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/qconf.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 7433dac6b90a..afae613ae0d8 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -297,10 +297,10 @@ void ConfigLineEdit::show(ConfigItem* i)
297void ConfigLineEdit::keyPressEvent(QKeyEvent* e) 297void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
298{ 298{
299 switch (e->key()) { 299 switch (e->key()) {
300 case Key_Escape: 300 case Qt::Key_Escape:
301 break; 301 break;
302 case Key_Return: 302 case Qt::Key_Return:
303 case Key_Enter: 303 case Qt::Key_Enter:
304 sym_set_string_value(item->menu->sym, text().latin1()); 304 sym_set_string_value(item->menu->sym, text().latin1());
305 parent()->updateList(item); 305 parent()->updateList(item);
306 break; 306 break;
@@ -639,7 +639,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
639 struct menu *menu; 639 struct menu *menu;
640 enum prop_type type; 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 emit parentSelected(); 643 emit parentSelected();
644 ev->accept(); 644 ev->accept();
645 return; 645 return;
@@ -652,8 +652,8 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
652 item = (ConfigItem*)i; 652 item = (ConfigItem*)i;
653 653
654 switch (ev->key()) { 654 switch (ev->key()) {
655 case Key_Return: 655 case Qt::Key_Return:
656 case Key_Enter: 656 case Qt::Key_Enter:
657 if (item->goParent) { 657 if (item->goParent) {
658 emit parentSelected(); 658 emit parentSelected();
659 break; 659 break;
@@ -667,16 +667,16 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
667 emit menuSelected(menu); 667 emit menuSelected(menu);
668 break; 668 break;
669 } 669 }
670 case Key_Space: 670 case Qt::Key_Space:
671 changeValue(item); 671 changeValue(item);
672 break; 672 break;
673 case Key_N: 673 case Qt::Key_N:
674 setValue(item, no); 674 setValue(item, no);
675 break; 675 break;
676 case Key_M: 676 case Qt::Key_M:
677 setValue(item, mod); 677 setValue(item, mod);
678 break; 678 break;
679 case Key_Y: 679 case Qt::Key_Y:
680 setValue(item, yes); 680 setValue(item, yes);
681 break; 681 break;
682 default: 682 default:
@@ -1315,18 +1315,18 @@ ConfigMainWindow::ConfigMainWindow(void)
1315 backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this); 1315 backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this);
1316 connect(backAction, SIGNAL(activated()), SLOT(goBack())); 1316 connect(backAction, SIGNAL(activated()), SLOT(goBack()));
1317 backAction->setEnabled(FALSE); 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 connect(quitAction, SIGNAL(activated()), SLOT(close())); 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 connect(loadAction, SIGNAL(activated()), SLOT(loadConfig())); 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 connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); 1323 connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
1324 conf_set_changed_callback(conf_changed); 1324 conf_set_changed_callback(conf_changed);
1325 // Set saveAction's initial state 1325 // Set saveAction's initial state
1326 conf_changed(); 1326 conf_changed();
1327 QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this); 1327 QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this);
1328 connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); 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 connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); 1330 connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
1331 QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this); 1331 QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
1332 connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); 1332 connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));