All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] kconfig: qconf: Fix find on split mode
@ 2020-06-28 12:18 ` Markus Elfring
  0 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-06-28 12:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-kbuild, linux-media
  Cc: linux-kernel, kernel-janitors, Masahiro Yamada, Maxim Levitsky

> The logic handling find on split mode is currently broken.

* Is there a word missing in this change description?

* Can any information become clearer another bit?


> Fix it, …

Please replace the beginning of this sentence with the tag “Fixes”.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=719fdd32921fb7e3208db8832d32ae1c2d68900f#n183

Regards,
Markus

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH] kconfig: qconf: Fix find on split mode
@ 2020-06-28 12:04 Mauro Carvalho Chehab
  0 siblings, 0 replies; 10+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-28 12:04 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Mauro Carvalho Chehab, Masahiro Yamada, linux-kbuild,
	linux-kernel, Maxim Levitsky

The logic handling find on split mode is currently broken.
Fix it, making it work again as expected.

Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 scripts/kconfig/qconf.cc | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c0ac8f7b5f1a..b8f577c6e8aa 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1645,22 +1645,21 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
 			return;
 		list->setRootMenu(parent);
 		break;
-	case symbolMode:
+	case menuMode:
 		if (menu->flags & MENU_ROOT) {
-			configList->setRootMenu(menu);
+			menuList->setRootMenu(menu);
 			configList->clearSelection();
-			list = menuList;
-		} else {
 			list = configList;
+		} else {
+			configList->setRootMenu(menu);
+			configList->clearSelection();
+
 			parent = menu_get_parent_menu(menu->parent);
 			if (!parent)
 				return;
-			item = menuList->findConfigItem(parent);
-			if (item) {
-				item->setSelected(true);
-				menuList->scrollToItem(item);
-			}
-			list->setRootMenu(parent);
+			menuList->setRootMenu(parent);
+
+			list = menuList;
 		}
 		break;
 	case fullMode:
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* Re: Search function in xconfig is partially broken after recent changes
@ 2020-06-25 13:42 Mauro Carvalho Chehab
  2020-06-25 14:52 ` [PATCH] kconfig: qconf: Fix find on split mode Mauro Carvalho Chehab
  0 siblings, 1 reply; 10+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-25 13:42 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-kernel

Em Thu, 25 Jun 2020 12:59:15 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:

> Hi Maxim,
> 
> Em Thu, 25 Jun 2020 12:25:10 +0300
> Maxim Levitsky <mlevitsk@redhat.com> escreveu:
> 
> > Hi!
> > 
> > I noticed that on recent kernels the search function in xconfig is partially broken.
> > This means that when you select a found entry, it is not selected in the main window,
> > something that I often do to find some entry near the area I would like to modify,
> > and then use main window to navigate/explore that area.
> > 
> > Reverting these commits helps restore the original behavier:
> > 
> > b311142fcfd37b58dfec72e040ed04949eb1ac86 - kconfig: qconf: fix support for the split view mode
> > cce1faba82645fee899ccef5b7d3050fed3a3d10 - kconfig: qconf: fix the content of the main widget
> > 
> > I have Qt5 5.13.2 from fedora 31 (5.13.2-1.fc31)
> > 
> > Could you explain what these commits are supposed to fix?
> > I mostly use the split view mode too and it does appear to work for me with these commits reverted as well.

Btw, I did a quick hack that makes it partially work: it updates the
main window, but if you seek for two items at the same window, it doesn't
do the right thing. It is also not updating the split window yet.

I'll try to polish and fix it if I have more time.

Thanks,
Mauro


diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c0ac8f7b5f1a..700731bf04b0 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1645,12 +1645,15 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
 			return;
 		list->setRootMenu(parent);
 		break;
+	case menuMode:
 	case symbolMode:
-		if (menu->flags & MENU_ROOT) {
+		if (!(menu->flags & MENU_ROOT)) {
+printf("Set root!\n");
 			configList->setRootMenu(menu);
 			configList->clearSelection();
 			list = menuList;
 		} else {
+printf("config list!\n");
 			list = configList;
 			parent = menu_get_parent_menu(menu->parent);
 			if (!parent)
@@ -1659,6 +1662,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
 			if (item) {
 				item->setSelected(true);
 				menuList->scrollToItem(item);
+				menuList->setFocus();
 			}
 			list->setRootMenu(parent);
 		}
@@ -1671,6 +1675,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
 	}
 
 	if (list) {
+printf("findConfigItem on list mode\n");
 		item = list->findConfigItem(menu);
 		if (item) {
 			item->setSelected(true);


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-30  3:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 12:18 [PATCH] kconfig: qconf: Fix find on split mode Markus Elfring
2020-06-28 12:18 ` Markus Elfring
2020-06-28 12:26 ` Mauro Carvalho Chehab
2020-06-28 12:26   ` Mauro Carvalho Chehab
  -- strict thread matches above, loose matches on Subject: below --
2020-06-28 12:04 Mauro Carvalho Chehab
2020-06-25 13:42 Search function in xconfig is partially broken after recent changes Mauro Carvalho Chehab
2020-06-25 14:52 ` [PATCH] kconfig: qconf: Fix find on split mode Mauro Carvalho Chehab
2020-06-28  2:17   ` Masahiro Yamada
2020-06-28  8:40   ` Maxim Levitsky
2020-06-28 14:42     ` Masahiro Yamada
2020-06-30  3:53       ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.