aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/qconf.h
AgeCommit message (Collapse)Author
2020-09-25kconfig: qconf: remove Y, M, N columnsMasahiro Yamada
There are so many ways to toggle bool / tristate options. I do not know how useful these columns are. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25kconfig: qconf: remove ConfigView classMasahiro Yamada
Now that ConfigView only contains ConfigList, we can remove ConfigView and just use ConfigList. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25kconfig: qconf: move setShowName/Range() to ConfigList from ConfigViewMasahiro Yamada
ConfigView::setShowName/Range() only get access to the 'list' member. Move them to the more relevant ConfigList class. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25kconfig: qconf: remove ConfigLineEdit classMasahiro Yamada
Now that "int", "hex", "string" menus are edited in-place, this class is no longer needed. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25kconfig: qconf: allow to edit "int", "hex", "string" menus in-placeMasahiro Yamada
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-25kconfig: qconf: show data column all the timeMasahiro Yamada
The next commit will allow users to edit "int", "hex", "string" menus in-place from the data column. The data column should be always displayed. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25kconfig: qconf: move ConfigView::updateList(All) to ConfigList classMasahiro Yamada
ConfigView::updateList() iterates over all views, and then calls updateList() against for its ConfigList instance. This means there is no point to implement it in the ConfigView class. Move and rename as follows: ConfigView::updateList() -> ConfigList::updateListForAll() ConfigView::updateListAll() -> ConfigList::updateListAllForAll() I used QList to contain all ConfigList instances. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-25kconfig: qconf: remove unused ConfigItem::okRename()Masahiro Yamada
Commit 76538660fb08 ("Port xconfig to Qt5 - Remove custom ListView classes.") removed the original implementation, where ConfigItem::okRename() overrode Q3ListViewItem::okRename(). Commit 59e564408f88 ("Port xconfig to Qt5 - Put back some of the old implementation.") restored the empty stub, but it seems useless. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-18kconfig: qconf: remove unused colNrMasahiro Yamada
This is not used at all. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-18kconfig: qconf: fix the popup menu in the ConfigInfoView windowMasahiro Yamada
I do not know when ConfigInfoView::createStandardContextMenu() is called. Because QTextEdit::createStandardContextMenu() is not virtual, ConfigInfoView::createStandardContextMenu() cannot override it. Even if right-click the ConfigInfoView window, the "Show Debug Info" menu does not show up. Build up the menu in the constructor, and invoke it from the contextMenuEvent(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: move setOptionMode() to ConfigList from ConfigViewMasahiro Yamada
ConfigView::setOptionMode() only gets access to the 'list' member. Move it to the more relevant ConfigList class. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: refactor icon setupsMasahiro Yamada
These icon data are used by ConfigItem, but stored in each instance of ConfigView. There is no point to keep the same data in each of 3 instances, "menu", "config", and "search". Move the icon data to the more relevant ConfigItem class, and make them static members. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove unused voidPix, menuInvPixMasahiro Yamada
These are initialized, but not used by anyone. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove ConfigItem::text/setTextMasahiro Yamada
Use QTreeWidgetItem::text/setText directly Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove ConfigList::addColumn/removeColumnMasahiro Yamada
Use QTreeView::showColumn/hideColumn directly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove ConfigItem::pixmap/setPixmapMasahiro Yamada
Use QTreeWidgetItem::icon/setIcon directly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove 'parent' from ConfigList::updateMenuList()Masahiro Yamada
All the call-sites of this function pass 'this' to the first argument. So, 'parent' is always the 'this' pointer. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove unused argument from ConfigView::updateList()Masahiro Yamada
Now that ConfigList::updateList() takes no argument, the 'item' argument ConfigView::updateList() is no longer used. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove unused argument from ConfigList::updateList()Masahiro Yamada
This function allocates 'item' before using it, so the argument 'item' is always shadowed. Remove the meaningless argument. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove name from ConfigSearchWindow constructorMasahiro Yamada
This constructor is only called with "search" as the second argument. Hard-code the name in the constructor, and drop it from the function argument. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove unused ConfigList::listView()Masahiro Yamada
I do not know how this function can be useful. In fact, it is unsed. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-14kconfig: qconf: remove toolBar from ConfigMainWindow membersMasahiro Yamada
This pointer is only used in the ConfigMainWindow constructor. Drop it from the private members. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-08-02kconfig: qconf: remove wrong ConfigList::firstChild()Masahiro Yamada
This function returns the first child object, but the returned pointer is not compatible with (ConfigItem *). Commit cc1c08edccaf ("kconfig: qconf: don't show goback button on splitMode") uncovered this issue because using the pointer from this function would make qconf crash. (https://lkml.org/lkml/2020/7/18/411) This function does not work. Remove. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-01kconfig: qconf: re-implement setSelected()Mauro Carvalho Chehab
The default implementation for setSelected() at QTreeWidgetItem allows multiple items to be selected. Well, this should never be possible for the configItem lists. So, implement a function that will automatically clean any previous selection. This simplifies the logic somewhat, while making the selection logic to be applied atomically, avoiding future issues on that. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-01kconfig: qconf: make debug links work againMauro Carvalho Chehab
The Qt5 conversion broke support for debug info links. Restore the behaviour added by changeset ab45d190fd4a ("kconfig: create links in info window"). The original approach was to pass a pointer for a data struct via an <a href>. That doesn't sound a good idea, as, if something gets wrong, the app could crash. So, instead, pass the name of the symbol, and validate such symbol at the hyperlink handling logic. Link: https://lore.kernel.org/lkml/20200628125421.12458086@coco.lan/ Reported-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-01kconfig: qconf: cleanup includesMauro Carvalho Chehab
The usage of c-like include is deprecated on modern Qt versions. Use the c++ style includes. While here, remove uneeded and redundant ones, sorting them on alphabetic order. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-09kconfig: qconf: fix support for the split view modeMauro Carvalho Chehab
At least on my tests (building against Qt5.13), it seems to me that, since Kernel 3.14, the split view mode is broken. Maybe it was not a top priority during the conversion time. Anyway, this patch changes the logic in order to properly support the split view mode and the single view mode. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2019-03-12kconfig: fix 'Save As' menu of xconfigMasahiro Yamada
The 'Save As' menu of xconfig is not working; it always saves the kernel configuration into the default file irrespective of the file chosen in the dialog box. The 'Save' menu always writes into the default file, but it would make more sense to write into the file previously chosen by 'Load' or 'Save As'. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-12-28kconfig: convert to SPDX License IdentifierMasahiro Yamada
All files in lxdialog/ are licensed under GPL-2.0+, and the rest are under GPL-2.0. I added GPL-2.0 tags to test scripts in tests/. Documentation/process/license-rules.rst does not suggest anything about the flex/bison files. Because flex does not accept the C++ comment style at the very top of a file, I used the C style for zconf.l, and so for zconf.y for consistency. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-10-14Port xconfig to Qt5 - Source format.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Change ConfigItem constructor parent type.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Remove ConfigList::updateMenuList template.Boris Barbulovski
ConfigItem executes parent->takeChild(0) while ConfigList executes parent->takeTopLevelItem(0) Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Put back some of the old implementation(part 2).Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Put back some of the old implementation.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItemBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Fix the code so it compiles with Qt5Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Remove custom ListView classes.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Make single/split/full actions checkable.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Replace Q3VBox with QWidgetBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Use QMenuBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Use QTextBrowserBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Use QListBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Use QActionBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Port xconfig to Qt5 - Use QMainWindow, QToolBarBoris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-14Remove support for QT3 and older.Boris Barbulovski
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2013-10-08xconfig: Fix the filename for GUI settingsBen Hutchings
Currently the qconf program invoked by 'make xconfig' stores GUI settings in the file ~/.config/Unknown\ Organization.conf. This name is apparently generated by the QSettings class when no organisation or application name are specified. This is obviously not a sensible filename (nor does it seem sensible that these QSettings parameters are optional!). Pass the names 'kernel.org' and 'qconf', resuling in the filename ~/.config/kernel.org/qconf.conf. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2011-07-25xconfig: Abort close if configuration cannot be savedMichal Marek
Give the user an opportunity to fix the error or save the configuration under a different path. Reported-by: Hiromu Yakura <hiromu1996@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-01kconfig qconf: port to QT4Alexander Stein
A straight forward port to QT4 using qt3to4 and compiling against qt3support * Use pkg-config to detect QT4 which is hopefully portable enough * If no QT4, QT3 will by tried instead * Classes renamed using qt3to4 * If build using QT3 renamed to QT3 class names using defines * ConfigInfoView::menu has to be renamed as QT4 moc strips struct from struct menu and creates a name conflict * QT2 support has been dropped * The hidden options inserted in 39a4897c1bb66e8a36043c105d7fd73d8b32b480 are use in native API Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02xconfig: add support to show hidden options which have promptsLi Zefan
This feature has been supported in menuconfig and gconfig, so here add it to xconfig. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Michal Marek <mmarek@suse.cz>