summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-06-30 08:48:35 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2020-07-02 00:08:09 +0900
commit8a3b6e5687836cd16bfdfec38c7313c95492169c (patch)
tree707a1591bd2408ae771af31bc7e93646a6a48adf /scripts
parentcc1c08edccaf5317d99a17a3231fe06381044e83 (diff)
downloadlinux-8a3b6e5687836cd16bfdfec38c7313c95492169c.tar.bz2
kconfig: qconf: navigate menus on hyperlinks
Instead of just changing the helper window to show a dependency, also navigate to it at the config and menu widgets. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/qconf.cc25
1 files changed, 7 insertions, 18 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 6a327b69ff5f..fd721c6c4c94 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1233,7 +1233,6 @@ void ConfigInfoView::clicked(const QUrl &url)
char *data = new char[count + 1];
struct symbol **result;
struct menu *m = NULL;
- char type;
if (count < 1) {
qInfo() << "Clicked link is empty";
@@ -1243,7 +1242,6 @@ void ConfigInfoView::clicked(const QUrl &url)
memcpy(data, str.constData(), count);
data[count] = '\0';
- type = data[0];
/* Seek for exact match */
data[0] = '^';
@@ -1256,15 +1254,8 @@ void ConfigInfoView::clicked(const QUrl &url)
}
sym = *result;
- if (type == 's') {
- symbolInfo();
- emit showDebugChanged(true);
- free(result);
- delete data;
- return;
- }
- /* URL is a menu */
+ /* Seek for the menu which holds the symbol */
for (struct property *prop = sym->prop; prop; prop = prop->next) {
if (prop->type != P_PROMPT && prop->type != P_MENU)
continue;
@@ -1273,16 +1264,13 @@ void ConfigInfoView::clicked(const QUrl &url)
}
if (!m) {
- qInfo() << "Clicked menu is invalid:" << data;
- free(result);
- delete data;
- return;
+ /* Symbol is not visible as a menu */
+ symbolInfo();
+ emit showDebugChanged(true);
+ } else {
+ emit menuSelected(m);
}
- _menu = m;
- menuInfo();
-
- emit showDebugChanged(true);
free(result);
delete data;
}
@@ -1731,6 +1719,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
list->setSelected(item, true);
list->scrollToItem(item);
list->setFocus();
+ helpText->setInfo(menu);
}
}
}