[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <45fa5ad583de1766de6169366df1df5837c5dc7c.1593423060.git.mchehab+huawei@kernel.org>
Date: Mon, 29 Jun 2020 11:35:39 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Maxim Levitsky <mlevitsk@...hat.com>,
Masahiro Yamada <masahiroy@...nel.org>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 5/5] 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@...nel.org>
---
scripts/kconfig/qconf.cc | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 49f0688fceb8..d8870b15a178 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1232,7 +1232,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";
@@ -1242,7 +1241,6 @@ void ConfigInfoView::clicked(const QUrl &url)
memcpy(data, str.constData(), count);
data[count] = '\0';
- type = data[0];
/* Seek for exact match */
data[0] = '^';
@@ -1255,15 +1253,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;
@@ -1271,17 +1262,11 @@ void ConfigInfoView::clicked(const QUrl &url)
break;
}
- if (!m) {
+ if (!m)
qInfo() << "Clicked menu is invalid:" << data;
- free(result);
- delete data;
- return;
- }
+ else
+ emit menuSelected(m);
- _menu = m;
- menuInfo();
-
- emit showDebugChanged(true);
free(result);
delete data;
}
@@ -1750,6 +1735,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
item->setSelected(true);
list->scrollToItem(item);
list->setFocus();
+ helpText->setInfo(menu);
}
}
}
--
2.26.2
Powered by blists - more mailing lists