summaryrefslogtreecommitdiff
path: root/scripts/kconfig/qconf.cc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-04-11 09:46:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-11 09:46:12 -0700
commitb753101a4ac0b906064a72feec43f5b80a1fe2e5 (patch)
tree90f8f851a5de81d17f2154526a13d91f07075bad /scripts/kconfig/qconf.cc
parentc7850ae4d71c48ab352bb4245bc24f7e984fe721 (diff)
parent00d76a0c19436c88ffcafa1e816f0c0c9af082a0 (diff)
Merge tag 'kbuild-v5.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - raise minimum supported binutils version to 2.23 - remove old CONFIG_AS_* macros that we know binutils >= 2.23 supports - move remaining CONFIG_AS_* tests to Kconfig from Makefile - enable -Wtautological-compare warnings to catch more issues - do not support GCC plugins for GCC <= 4.7 - fix various breakages of 'make xconfig' - include the linker version used for linking the kernel into LINUX_COMPILER, which is used for the banner, and also exposed to /proc/version - link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y, which allows us to remove the lib-ksyms.o workaround, and to solve the last known issue of the LLVM linker - add dummy tools in scripts/dummy-tools/ to enable all compiler tests in Kconfig, which will be useful for distro maintainers - support the single switch, LLVM=1 to use Clang and all LLVM utilities instead of GCC and Binutils. - support LLVM_IAS=1 to enable the integrated assembler, which is still experimental * tag 'kbuild-v5.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (36 commits) kbuild: fix comment about missing include guard detection kbuild: support LLVM=1 to switch the default tools to Clang/LLVM kbuild: replace AS=clang with LLVM_IAS=1 kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig kbuild: link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y MIPS: fw: arc: add __weak to prom_meminit and prom_free_prom_memory kbuild: remove -I$(srctree)/tools/include from scripts/Makefile kbuild: do not pass $(KBUILD_CFLAGS) to scripts/mkcompile_h Documentation/llvm: fix the name of llvm-size kbuild: mkcompile_h: Include $LD version in /proc/version kconfig: qconf: Fix a few alignment issues kconfig: qconf: remove some old bogus TODOs kconfig: qconf: fix support for the split view mode kconfig: qconf: fix the content of the main widget kconfig: qconf: Change title for the item window kconfig: qconf: clean deprecated warnings gcc-plugins: drop support for GCC <= 4.7 kbuild: Enable -Wtautological-compare x86: update AS_* macros to binutils >=2.23, supporting ADX and AVX2 crypto: x86 - clean up poly1305-x86_64-cryptogams.S by 'make clean' ...
Diffstat (limited to 'scripts/kconfig/qconf.cc')
-rw-r--r--scripts/kconfig/qconf.cc90
1 files changed, 64 insertions, 26 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 50a5245d87bb..c0ac8f7b5f1a 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -154,9 +154,9 @@ void ConfigItem::updateMenu(void)
if (!sym_is_changeable(sym) && list->optMode == normalOpt) {
setPixmap(promptColIdx, QIcon());
- setText(noColIdx, QString::null);
- setText(modColIdx, QString::null);
- setText(yesColIdx, QString::null);
+ setText(noColIdx, QString());
+ setText(modColIdx, QString());
+ setText(yesColIdx, QString());
break;
}
expr = sym_get_tristate_value(sym);
@@ -276,7 +276,7 @@ void ConfigLineEdit::show(ConfigItem* i)
if (sym_get_string_value(item->menu->sym))
setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym)));
else
- setText(QString::null);
+ setText(QString());
Parent::show();
setFocus();
}
@@ -316,7 +316,10 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
setVerticalScrollMode(ScrollPerPixel);
setHorizontalScrollMode(ScrollPerPixel);
- setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
+ if (mode == symbolMode)
+ setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
+ else
+ setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
connect(this, SIGNAL(itemSelectionChanged(void)),
SLOT(updateSelection(void)));
@@ -397,6 +400,11 @@ void ConfigList::updateSelection(void)
struct menu *menu;
enum prop_type type;
+ if (mode == symbolMode)
+ setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
+ else
+ setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
+
if (selectedItems().count() == 0)
return;
@@ -625,7 +633,7 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu)
last = item;
continue;
}
- hide:
+hide:
if (item && item->menu == child) {
last = parent->firstChild();
if (last == item)
@@ -690,7 +698,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
last = item;
continue;
}
- hide:
+hide:
if (item && item->menu == child) {
last = (ConfigItem*)parent->topLevelItem(0);
if (last == item)
@@ -734,7 +742,10 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
if (type == P_MENU && rootEntry != menu &&
mode != fullMode && mode != menuMode) {
- emit menuSelected(menu);
+ if (mode == menuMode)
+ emit menuSelected(menu);
+ else
+ emit itemSelected(menu);
break;
}
case Qt::Key_Space:
@@ -826,7 +837,7 @@ void ConfigList::mouseMoveEvent(QMouseEvent* e)
void ConfigList::mouseDoubleClickEvent(QMouseEvent* e)
{
- QPoint p = e->pos(); // TODO: Check if this works(was contentsToViewport).
+ QPoint p = e->pos();
ConfigItem* item = (ConfigItem*)itemAt(p);
struct menu *menu;
enum prop_type ptype;
@@ -841,9 +852,12 @@ void ConfigList::mouseDoubleClickEvent(QMouseEvent* e)
if (!menu)
goto skip;
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
- if (ptype == P_MENU && (mode == singleMode || mode == symbolMode))
- emit menuSelected(menu);
- else if (menu->sym)
+ if (ptype == P_MENU) {
+ if (mode == singleMode)
+ emit itemSelected(menu);
+ else if (mode == symbolMode)
+ emit menuSelected(menu);
+ } else if (menu->sym)
changeValue(item);
skip:
@@ -1223,10 +1237,11 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
{
QMenu* popup = Parent::createStandardContextMenu(pos);
QAction* action = new QAction("Show Debug Info", popup);
- action->setCheckable(true);
- connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
- connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
- action->setChecked(showDebug());
+
+ action->setCheckable(true);
+ connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
+ connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
+ action->setChecked(showDebug());
popup->addSeparator();
popup->addAction(action);
return popup;
@@ -1352,21 +1367,32 @@ ConfigMainWindow::ConfigMainWindow(void)
if ((x.isValid())&&(y.isValid()))
move(x.toInt(), y.toInt());
- split1 = new QSplitter(this);
+ QWidget *widget = new QWidget(this);
+ QVBoxLayout *layout = new QVBoxLayout(widget);
+ setCentralWidget(widget);
+
+ split1 = new QSplitter(widget);
split1->setOrientation(Qt::Horizontal);
- setCentralWidget(split1);
+ split1->setChildrenCollapsible(false);
- menuView = new ConfigView(split1, "menu");
+ menuView = new ConfigView(widget, "menu");
menuList = menuView->list;
- split2 = new QSplitter(split1);
+ split2 = new QSplitter(widget);
+ split2->setChildrenCollapsible(false);
split2->setOrientation(Qt::Vertical);
// create config tree
- configView = new ConfigView(split2, "config");
+ configView = new ConfigView(widget, "config");
configList = configView->list;
- helpText = new ConfigInfoView(split2, "help");
+ helpText = new ConfigInfoView(widget, "help");
+
+ layout->addWidget(split2);
+ split2->addWidget(split1);
+ split1->addWidget(configView);
+ split1->addWidget(menuView);
+ split2->addWidget(helpText);
setTabOrder(configList, helpText);
configList->setFocus();
@@ -1484,6 +1510,8 @@ ConfigMainWindow::ConfigMainWindow(void)
helpText, SLOT(setInfo(struct menu *)));
connect(configList, SIGNAL(menuSelected(struct menu *)),
SLOT(changeMenu(struct menu *)));
+ connect(configList, SIGNAL(itemSelected(struct menu *)),
+ SLOT(changeItens(struct menu *)));
connect(configList, SIGNAL(parentSelected()),
SLOT(goBack()));
connect(menuList, SIGNAL(menuChanged(struct menu *)),
@@ -1580,15 +1608,26 @@ void ConfigMainWindow::searchConfig(void)
searchWindow->show();
}
-void ConfigMainWindow::changeMenu(struct menu *menu)
+void ConfigMainWindow::changeItens(struct menu *menu)
{
configList->setRootMenu(menu);
+
if (configList->rootEntry->parent == &rootmenu)
backAction->setEnabled(false);
else
backAction->setEnabled(true);
}
+void ConfigMainWindow::changeMenu(struct menu *menu)
+{
+ menuList->setRootMenu(menu);
+
+ if (menuList->rootEntry->parent == &rootmenu)
+ backAction->setEnabled(false);
+ else
+ backAction->setEnabled(true);
+}
+
void ConfigMainWindow::setMenuLink(struct menu *menu)
{
struct menu *parent;
@@ -1698,14 +1737,14 @@ void ConfigMainWindow::showSplitView(void)
fullViewAction->setEnabled(true);
fullViewAction->setChecked(false);
- configList->mode = symbolMode;
+ configList->mode = menuMode;
if (configList->rootEntry == &rootmenu)
configList->updateListAll();
else
configList->setRootMenu(&rootmenu);
configList->setAllOpen(true);
configApp->processEvents();
- menuList->mode = menuMode;
+ menuList->mode = symbolMode;
menuList->setRootMenu(&rootmenu);
menuList->setAllOpen(true);
menuView->show();
@@ -1733,7 +1772,6 @@ void ConfigMainWindow::showFullView(void)
/*
* ask for saving configuration before quitting
- * TODO ask only when something changed
*/
void ConfigMainWindow::closeEvent(QCloseEvent* e)
{