aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/qconf.cc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-14 14:12:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-14 14:12:18 -0700
commit45e3e1935e2857c54783291107d33323b3ef33c8 (patch)
tree26a6e3228b52d0f96f6e56e5879ca898fe909592 /scripts/kconfig/qconf.cc
parentcf5046323ea254be72535648a9d090b18b8510f3 (diff)
parent3f8d9ced7746f3f329ccca0bb3f3c7a2c15c47bb (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits) .gitignore: ignore *.lzma files kbuild: add generic --set-str option to scripts/config kbuild: simplify argument loop in scripts/config kbuild: handle non-existing options in scripts/config kallsyms: generalize text region handling kallsyms: support kernel symbols in Blackfin on-chip memory documentation: make version fix kbuild: fix a compile warning gitignore: Add GNU GLOBAL files to top .gitignore kbuild: fix delay in setlocalversion on readonly source README: fix misleading pointer to the defconf directory vmlinux.lds.h update kernel-doc: cleanup perl script Improve vmlinux.lds.h support for arch specific linker scripts kbuild: fix headers_exports with boolean expression kbuild/headers_check: refine extern check kbuild: fix "Argument list too long" error for "make headers_check", ignore *.patch files Remove bashisms from scripts menu: fix embedded menu presentation ...
Diffstat (limited to 'scripts/kconfig/qconf.cc')
-rw-r--r--scripts/kconfig/qconf.cc48
1 files changed, 27 insertions, 21 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 5d0fd38b089..ce7d508c752 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -5,6 +5,7 @@
#include <qapplication.h>
#include <qmainwindow.h>
+#include <qdesktopwidget.h>
#include <qtoolbar.h>
#include <qlayout.h>
#include <qvbox.h>
@@ -297,10 +298,10 @@ void ConfigLineEdit::show(ConfigItem* i)
void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
{
switch (e->key()) {
- case Key_Escape:
+ case Qt::Key_Escape:
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
sym_set_string_value(item->menu->sym, text().latin1());
parent()->updateList(item);
break;
@@ -639,7 +640,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
struct menu *menu;
enum prop_type type;
- if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) {
+ if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
emit parentSelected();
ev->accept();
return;
@@ -652,8 +653,8 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
item = (ConfigItem*)i;
switch (ev->key()) {
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
if (item->goParent) {
emit parentSelected();
break;
@@ -667,16 +668,16 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
emit menuSelected(menu);
break;
}
- case Key_Space:
+ case Qt::Key_Space:
changeValue(item);
break;
- case Key_N:
+ case Qt::Key_N:
setValue(item, no);
break;
- case Key_M:
+ case Qt::Key_M:
setValue(item, mod);
break;
- case Key_Y:
+ case Qt::Key_Y:
setValue(item, yes);
break;
default:
@@ -920,7 +921,7 @@ void ConfigView::updateListAll(void)
}
ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
- : Parent(parent, name), menu(0), sym(0)
+ : Parent(parent, name), sym(0), menu(0)
{
if (name) {
configSettings->beginGroup(name);
@@ -1199,7 +1200,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
layout1->addLayout(layout2);
split = new QSplitter(this);
- split->setOrientation(QSplitter::Vertical);
+ split->setOrientation(Qt::Vertical);
list = new ConfigView(split, name);
list->list->mode = listMode;
info = new ConfigInfoView(split, name);
@@ -1275,7 +1276,7 @@ ConfigMainWindow::ConfigMainWindow(void)
int x, y, width, height;
char title[256];
- QWidget *d = configApp->desktop();
+ QDesktopWidget *d = configApp->desktop();
snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"),
getenv("KERNELVERSION"));
setCaption(title);
@@ -1290,14 +1291,14 @@ ConfigMainWindow::ConfigMainWindow(void)
move(x, y);
split1 = new QSplitter(this);
- split1->setOrientation(QSplitter::Horizontal);
+ split1->setOrientation(Qt::Horizontal);
setCentralWidget(split1);
menuView = new ConfigView(split1, "menu");
menuList = menuView->list;
split2 = new QSplitter(split1);
- split2->setOrientation(QSplitter::Vertical);
+ split2->setOrientation(Qt::Vertical);
// create config tree
configView = new ConfigView(split2, "config");
@@ -1315,18 +1316,18 @@ ConfigMainWindow::ConfigMainWindow(void)
backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this);
connect(backAction, SIGNAL(activated()), SLOT(goBack()));
backAction->setEnabled(FALSE);
- QAction *quitAction = new QAction("Quit", _("&Quit"), CTRL+Key_Q, this);
+ QAction *quitAction = new QAction("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this);
connect(quitAction, SIGNAL(activated()), SLOT(close()));
- QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this);
+ QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this);
connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
- saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this);
+ saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this);
connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
conf_set_changed_callback(conf_changed);
// Set saveAction's initial state
conf_changed();
QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this);
connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
- QAction *searchAction = new QAction("Find", _("&Find"), CTRL+Key_F, this);
+ QAction *searchAction = new QAction("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this);
connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
@@ -1447,7 +1448,7 @@ ConfigMainWindow::ConfigMainWindow(void)
void ConfigMainWindow::loadConfig(void)
{
- QString s = QFileDialog::getOpenFileName(".config", NULL, this);
+ QString s = QFileDialog::getOpenFileName(conf_get_configname(), NULL, this);
if (s.isNull())
return;
if (conf_read(QFile::encodeName(s)))
@@ -1463,7 +1464,7 @@ void ConfigMainWindow::saveConfig(void)
void ConfigMainWindow::saveConfigAs(void)
{
- QString s = QFileDialog::getSaveFileName(".config", NULL, this);
+ QString s = QFileDialog::getSaveFileName(conf_get_configname(), NULL, this);
if (s.isNull())
return;
if (conf_write(QFile::encodeName(s)))
@@ -1524,6 +1525,8 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
case fullMode:
list = configList;
break;
+ default:
+ break;
}
if (list) {
@@ -1673,6 +1676,9 @@ void ConfigMainWindow::saveSettings(void)
case fullMode :
entry = "full";
break;
+
+ default:
+ break;
}
configSettings->writeEntry("/listMode", entry);