Commit f3eea294 authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: qconf: remove ConfigLineEdit class

Now that "int", "hex", "string" menus are edited in-place, this class
is no longer needed.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 37162a68
...@@ -307,42 +307,6 @@ parent: ...@@ -307,42 +307,6 @@ parent:
QStyledItemDelegate::setModelData(editor, model, index); QStyledItemDelegate::setModelData(editor, model, index);
} }
ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
: Parent(parent)
{
connect(this, SIGNAL(editingFinished()), SLOT(hide()));
}
void ConfigLineEdit::show(ConfigItem* i)
{
item = i;
if (sym_get_string_value(item->menu->sym))
setText(sym_get_string_value(item->menu->sym));
else
setText(QString());
Parent::show();
setFocus();
}
void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
{
switch (e->key()) {
case Qt::Key_Escape:
break;
case Qt::Key_Return:
case Qt::Key_Enter:
sym_set_string_value(item->menu->sym, text().toLatin1());
ConfigList::updateListForAll();
break;
default:
Parent::keyPressEvent(e);
return;
}
e->accept();
parent()->list->setFocus();
hide();
}
ConfigList::ConfigList(ConfigView* p, const char *name) ConfigList::ConfigList(ConfigView* p, const char *name)
: Parent(p), : Parent(p),
updateAll(false), updateAll(false),
...@@ -990,9 +954,6 @@ ConfigView::ConfigView(QWidget* parent, const char *name) ...@@ -990,9 +954,6 @@ ConfigView::ConfigView(QWidget* parent, const char *name)
list = new ConfigList(this); list = new ConfigList(this);
verticalLayout->addWidget(list); verticalLayout->addWidget(list);
lineEdit = new ConfigLineEdit(this);
lineEdit->hide();
verticalLayout->addWidget(lineEdit);
} }
void ConfigView::setShowName(bool b) void ConfigView::setShowName(bool b)
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
class ConfigView; class ConfigView;
class ConfigList; class ConfigList;
class ConfigItem; class ConfigItem;
class ConfigLineEdit;
class ConfigMainWindow; class ConfigMainWindow;
class ConfigSettings : public QSettings { class ConfigSettings : public QSettings {
...@@ -187,22 +186,6 @@ class ConfigItemDelegate : public QStyledItemDelegate ...@@ -187,22 +186,6 @@ class ConfigItemDelegate : public QStyledItemDelegate
const QModelIndex &index) const override; const QModelIndex &index) const override;
}; };
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 { class ConfigView : public QWidget {
Q_OBJECT Q_OBJECT
typedef class QWidget Parent; typedef class QWidget Parent;
...@@ -219,7 +202,6 @@ public slots: ...@@ -219,7 +202,6 @@ public slots:
void showRangeChanged(bool); void showRangeChanged(bool);
public: public:
ConfigList* list; ConfigList* list;
ConfigLineEdit* lineEdit;
}; };
class ConfigInfoView : public QTextBrowser { class ConfigInfoView : public QTextBrowser {
......
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