Commit f9893351 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kconfig-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada:

 - Remove unused or useless code from qconf

 - Allow to edit "int", "hex", "string" options in place, and remove the
   separate edit box from qconf

* tag 'kconfig-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: qconf: create QApplication after option checks
  kconfig: qconf: remove Y, M, N columns
  kconfig: qconf: remove ConfigView class
  kconfig: qconf: move setShowName/Range() to ConfigList from ConfigView
  kconfig: qconf: remove ConfigLineEdit class
  kconfig: qconf: allow to edit "int", "hex", "string" menus in-place
  kconfig: qconf: show data column all the time
  kconfig: qconf: move ConfigView::updateList(All) to ConfigList class
  kconfig: qconf: remove unused ConfigItem::okRename()
  kconfig: qconf: update the intro message to match to the current code
  kconfig: qconf: reformat the intro message
parents 746b25b1 f9a825a7
This diff is collapsed.
......@@ -11,15 +11,14 @@
#include <QPushButton>
#include <QSettings>
#include <QSplitter>
#include <QStyledItemDelegate>
#include <QTextBrowser>
#include <QTreeWidget>
#include "expr.h"
class ConfigView;
class ConfigList;
class ConfigItem;
class ConfigLineEdit;
class ConfigMainWindow;
class ConfigSettings : public QSettings {
......@@ -30,7 +29,7 @@ class ConfigSettings : public QSettings {
};
enum colIdx {
promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx
promptColIdx, nameColIdx, dataColIdx
};
enum listMode {
singleMode, menuMode, symbolMode, fullMode, listMode
......@@ -43,13 +42,10 @@ class ConfigList : public QTreeWidget {
Q_OBJECT
typedef class QTreeWidget Parent;
public:
ConfigList(ConfigView* p, const char *name = 0);
ConfigList(QWidget *parent, const char *name = 0);
~ConfigList();
void reinit(void);
ConfigItem* findConfigItem(struct menu *);
ConfigView* parent(void) const
{
return (ConfigView*)Parent::parent();
}
void setSelected(QTreeWidgetItem *item, bool enable) {
for (int i = 0; i < selectedItems().size(); i++)
selectedItems().at(i)->setSelected(false);
......@@ -75,6 +71,7 @@ public slots:
void updateSelection(void);
void saveSettings(void);
void setOptionMode(QAction *action);
void setShowName(bool on);
signals:
void menuChanged(struct menu *menu);
......@@ -82,6 +79,7 @@ public slots:
void itemSelected(struct menu *menu);
void parentSelected(void);
void gotFocus(struct menu *);
void showNameChanged(bool on);
public:
void updateListAll(void)
......@@ -100,7 +98,7 @@ public slots:
bool updateAll;
bool showName, showRange, showData;
bool showName;
enum listMode mode;
enum optionMode optMode;
struct menu *rootEntry;
......@@ -108,6 +106,10 @@ public slots:
QPalette inactivedColorGroup;
QMenu* headerPopup;
static QList<ConfigList *> allLists;
static void updateListForAll();
static void updateListAllForAll();
static QAction *showNormalAction, *showAllAction, *showPromptAction;
};
......@@ -131,7 +133,6 @@ class ConfigItem : public QTreeWidgetItem {
}
~ConfigItem(void);
void init(void);
void okRename(int col);
void updateMenu(void);
void testUpdateMenu(bool v);
ConfigList* listView() const
......@@ -168,48 +169,18 @@ class ConfigItem : public QTreeWidgetItem {
static QIcon menuIcon, menubackIcon;
};
class ConfigLineEdit : public QLineEdit {
Q_OBJECT
typedef class QLineEdit Parent;
public:
ConfigLineEdit(ConfigView* parent);
ConfigView* parent(void) const
{
return (ConfigView*)Parent::parent();
}
void show(ConfigItem *i);
void keyPressEvent(QKeyEvent *e);
public:
ConfigItem *item;
};
class ConfigView : public QWidget {
Q_OBJECT
typedef class QWidget Parent;
public:
ConfigView(QWidget* parent, const char *name = 0);
~ConfigView(void);
static void updateList();
static void updateListAll(void);
bool showName(void) const { return list->showName; }
bool showRange(void) const { return list->showRange; }
bool showData(void) const { return list->showData; }
public slots:
void setShowName(bool);
void setShowRange(bool);
void setShowData(bool);
signals:
void showNameChanged(bool);
void showRangeChanged(bool);
void showDataChanged(bool);
class ConfigItemDelegate : public QStyledItemDelegate
{
private:
struct menu *menu;
public:
ConfigList* list;
ConfigLineEdit* lineEdit;
static ConfigView* viewList;
ConfigView* nextView;
ConfigItemDelegate(QObject *parent = nullptr)
: QStyledItemDelegate(parent) {}
QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override;
};
class ConfigInfoView : public QTextBrowser {
......@@ -257,7 +228,7 @@ public slots:
QLineEdit* editField;
QPushButton* searchButton;
QSplitter* split;
ConfigView* list;
ConfigList *list;
ConfigInfoView* info;
struct symbol **result;
......@@ -292,9 +263,7 @@ public slots:
void closeEvent(QCloseEvent *e);
ConfigSearchWindow *searchWindow;
ConfigView *menuView;
ConfigList *menuList;
ConfigView *configView;
ConfigList *configList;
ConfigInfoView *helpText;
QAction *backAction;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment