linux/scripts/kconfig
Masahiro Yamada 37162a68bf kconfig: qconf: allow to edit "int", "hex", "string" menus in-place
Previously, when you double-clicked the "int", "hex", or "string" menus,
a line-edit gadget showed up to allow you to input the value, which
looked clumsy.

Also, it was buggy; the editor opened even if the config option was not
editable. For example, just try to double-click CC_VERSION_TEXT, which
has no prompt.

This commit sub-classes QStyleItemDelegate to allow users to edit
"int", "hex", "string" menus in-place. Just double-click (or press
the F2 key) in the data column. Then, an editor widget is placed on
top of the item view.

The two methods are overridden:

 createEditor - process only when the data column is being accessed
 and the menu is visible. Otherwise, return nullptr to disallow editing.

 setModelData - take the new data from the editor, and set it to the
 addressed symbol. If it was successful, update all the list windows.
 Otherwise, (the reason for the failure is possibly the input data was
 out of range), set the old value back to the editor.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25 00:37:13 +09:00
..
lxdialog kconfig: remove trailing whitespaces 2019-05-09 22:37:17 +09:00
tests kconfig: tests: remove randconfig test for choice in choice 2020-05-12 13:28:30 +09:00
.gitignore kconfig: qconf: compile moc object separately 2020-08-01 20:54:39 +09:00
conf.c kconfig: Add yes2modconfig and mod2yesconfig targets. 2020-01-07 02:18:45 +09:00
confdata.c kconfig: Invalidate all symbols after changing to y or m. 2020-02-05 13:45:37 +09:00
expr.c kconfig: distinguish between dependencies and visibility in help text 2020-01-07 02:18:45 +09:00
expr.h kconfig: distinguish between dependencies and visibility in help text 2020-01-07 02:18:45 +09:00
gconf-cfg.sh kconfig: do not require pkg-config on make {menu,n}config 2018-09-03 02:13:48 +09:00
gconf.c kconfig: fix an "implicit declaration of function" warning 2020-01-10 02:44:54 +09:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
images.c kconfig: constify XPM data 2020-08-14 13:30:03 +09:00
images.h kconfig: constify XPM data 2020-08-14 13:30:03 +09:00
lexer.l kconfig: add 'static' to some file-local data 2020-08-14 13:30:04 +09:00
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lkc_proto.h kconfig: qconf: fix incomplete type 'struct gstr' warning 2020-09-20 12:58:49 +09:00
lkc.h kconfig: qconf: fix incomplete type 'struct gstr' warning 2020-09-20 12:58:49 +09:00
Makefile kconfig: qconf: compile moc object separately 2020-08-01 20:54:39 +09:00
mconf-cfg.sh kconfig: be more helpful if pkg-config is missing 2019-11-11 20:10:01 +09:00
mconf.c kconfig: fix an "implicit declaration of function" warning 2020-01-10 02:44:54 +09:00
menu.c kconfig: do not assign a variable in the return statement 2020-05-12 13:28:30 +09:00
merge_config.sh merge_config.sh: ignore unwanted grep errors 2019-09-04 23:12:50 +09:00
nconf-cfg.sh kconfig: be more helpful if pkg-config is missing 2019-11-11 20:10:01 +09:00
nconf.c kconfig: remove redundant assignment prompt = prompt 2020-09-03 12:21:22 +09:00
nconf.gui.c kconfig/[mn]conf: handle backspace (^H) key 2019-03-29 22:48:01 +09:00
nconf.h kconfig: convert to SPDX License Identifier 2018-12-28 22:22:28 +09:00
parser.y kconfig: allow only 'config', 'comment', and 'if' inside 'choice' 2020-05-12 13:28:30 +09:00
preprocess.c kconfig: add static qualifier to expand_string() 2019-06-09 15:08:18 +09:00
qconf-cfg.sh kconfig: do not require pkg-config on make {menu,n}config 2018-09-03 02:13:48 +09:00
qconf.cc kconfig: qconf: allow to edit "int", "hex", "string" menus in-place 2020-09-25 00:37:13 +09:00
qconf.h kconfig: qconf: allow to edit "int", "hex", "string" menus in-place 2020-09-25 00:37:13 +09:00
streamline_config.pl kconfig: streamline_config.pl: check defined(ENV variable) before using it 2020-09-03 12:16:30 +09:00
symbol.c kconfig: add 'static' to some file-local data 2020-08-14 13:30:04 +09:00
util.c kconfig: convert to SPDX License Identifier 2018-12-28 22:22:28 +09:00