switch jfs to inode->i_acl
[pandora-kernel.git] / scripts / kconfig / qconf.cc
index 5d0fd38..ce7d508 100644 (file)
@@ -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);