All of lore.kernel.org
 help / color / mirror / Atom feed
* Search function in xconfig is partially broken after recent changes
@ 2020-06-25  9:25 Maxim Levitsky
  2020-06-25 10:59 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Maxim Levitsky @ 2020-06-25  9:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mauro Carvalho Chehab

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.

Another question is do you know how to run the qconf standalone? It appears to crash when I attempt to do so,
althought I checked that I pass correct command line to it, and use the same current directory.
I guess PATH or something is set by the makefile, but I was unable yet to find out what exactly breaks it.

This is what I see:

[mlevitsk@starship ~/UPSTREAM/linux-kernel/src]$./scripts/kconfig/qconf Kconfig
sh: /scripts/gcc-version.sh: No such file or directory
init/Kconfig:34: syntax error
init/Kconfig:33: invalid statement
init/Kconfig:34: invalid statement
sh: /scripts/ld-version.sh: No such file or directory
sh: --version: command not found
init/Kconfig:39: syntax error
init/Kconfig:38: invalid statement
sh: /scripts/clang-version.sh: No such file or directory
init/Kconfig:49: syntax error
init/Kconfig:48: invalid statement
Recursive inclusion detected.
Inclusion path:

I ended up hacking the Makefile to run gdb on xconfig and I also hacked it to add -g2 to gcc,
as it looks like CFLAGS and CXXFLAGS don't affect build of xconfig.

I tried to debug this is a bit with mixed success but still I don't see the smoking gun.

Best regards,
	Maxim Levitsky


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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-25  9:25 Search function in xconfig is partially broken after recent changes Maxim Levitsky
@ 2020-06-25 10:59 ` Mauro Carvalho Chehab
  2020-06-25 11:17   ` Mauro Carvalho Chehab
  2020-06-25 13:42   ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-25 10:59 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-kernel

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.
> 

There are three view modes for qconf:

	- Single
	- Split
	- Full

those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
Those patches restore the original behavior.

> Another question is do you know how to run the qconf standalone? It appears to crash when I attempt to do so,
> althought I checked that I pass correct command line to it, and use the same current directory.
> I guess PATH or something is set by the makefile, but I was unable yet to find out what exactly breaks it.
> 
> This is what I see:
> 
> [mlevitsk@starship ~/UPSTREAM/linux-kernel/src]$./scripts/kconfig/qconf Kconfig
> sh: /scripts/gcc-version.sh: No such file or directory
> init/Kconfig:34: syntax error
> init/Kconfig:33: invalid statement
> init/Kconfig:34: invalid statement
> sh: /scripts/ld-version.sh: No such file or directory
> sh: --version: command not found
> init/Kconfig:39: syntax error
> init/Kconfig:38: invalid statement
> sh: /scripts/clang-version.sh: No such file or directory
> init/Kconfig:49: syntax error
> init/Kconfig:48: invalid statement
> Recursive inclusion detected.
> Inclusion path:

It requires some environment vars. This would make it a little better:


	export LD=$(which ldd); export CC=$(which gcc); export srctree=$(pwd); scripts/kconfig/gconf Kconfig
	Recursive inclusion detected.
	Inclusion path:
	  current file : arch//Kconfig
	  included from: arch//Kconfig:10

but it seems that something else is also needed.

Thanks,
Mauro

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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-25 10:59 ` Mauro Carvalho Chehab
@ 2020-06-25 11:17   ` Mauro Carvalho Chehab
  2020-06-25 12:53     ` Maxim Levitsky
  2020-06-25 13:42   ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-25 11:17 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.
> > 
> 
> There are three view modes for qconf:
> 
> 	- Single
> 	- Split
> 	- Full
> 
> those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
> Those patches restore the original behavior.
> 
> > Another question is do you know how to run the qconf standalone? It appears to crash when I attempt to do so,
> > althought I checked that I pass correct command line to it, and use the same current directory.
> > I guess PATH or something is set by the makefile, but I was unable yet to find out what exactly breaks it.
> > 
> > This is what I see:
> > 
> > [mlevitsk@starship ~/UPSTREAM/linux-kernel/src]$./scripts/kconfig/qconf Kconfig
> > sh: /scripts/gcc-version.sh: No such file or directory
> > init/Kconfig:34: syntax error
> > init/Kconfig:33: invalid statement
> > init/Kconfig:34: invalid statement
> > sh: /scripts/ld-version.sh: No such file or directory
> > sh: --version: command not found
> > init/Kconfig:39: syntax error
> > init/Kconfig:38: invalid statement
> > sh: /scripts/clang-version.sh: No such file or directory
> > init/Kconfig:49: syntax error
> > init/Kconfig:48: invalid statement
> > Recursive inclusion detected.
> > Inclusion path:
> 
> It requires some environment vars. This would make it a little better:
> 
> 
> 	export LD=$(which ldd); export CC=$(which gcc); export srctree=$(pwd); scripts/kconfig/gconf Kconfig
> 	Recursive inclusion detected.
> 	Inclusion path:
> 	  current file : arch//Kconfig
> 	  included from: arch//Kconfig:10
> 
> but it seems that something else is also needed.

This worked for me:

	SRCARCH=x86 LD=$(which ldd) CC=$(which gcc) srctree=$(pwd) scripts/kconfig/gconf Kconfig

Thanks,
Mauro

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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-25 11:17   ` Mauro Carvalho Chehab
@ 2020-06-25 12:53     ` Maxim Levitsky
  2020-06-25 15:05       ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Maxim Levitsky @ 2020-06-25 12:53 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-kernel

On Thu, 2020-06-25 at 13:17 +0200, Mauro Carvalho Chehab wrote:
> 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.
> > > 
> > 
> > There are three view modes for qconf:
> > 
> > 	- Single
> > 	- Split
> > 	- Full
> > 
> > those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
> > Those patches restore the original behavior.
You mean xconfig/qconf? (gconf is another program that is GTK based as far as I know).

Could you expalin though what was broken? What exactly didn't work?
I do seem to be able to select menus on the left and the config items to the right,
change the config item values, etc, in the split mode at least with these commits reverted.

Could you check that you also have the issue with search in qconf/xconfig?

> > 
> > > Another question is do you know how to run the qconf standalone? It appears to crash when I attempt to do so,
> > > althought I checked that I pass correct command line to it, and use the same current directory.
> > > I guess PATH or something is set by the makefile, but I was unable yet to find out what exactly breaks it.
> > > 
> > > This is what I see:
> > > 
> > > [mlevitsk@starship ~/UPSTREAM/linux-kernel/src]$./scripts/kconfig/qconf Kconfig
> > > sh: /scripts/gcc-version.sh: No such file or directory
> > > init/Kconfig:34: syntax error
> > > init/Kconfig:33: invalid statement
> > > init/Kconfig:34: invalid statement
> > > sh: /scripts/ld-version.sh: No such file or directory
> > > sh: --version: command not found
> > > init/Kconfig:39: syntax error
> > > init/Kconfig:38: invalid statement
> > > sh: /scripts/clang-version.sh: No such file or directory
> > > init/Kconfig:49: syntax error
> > > init/Kconfig:48: invalid statement
> > > Recursive inclusion detected.
> > > Inclusion path:
> > 
> > It requires some environment vars. This would make it a little better:
> > 
> > 
> > 	export LD=$(which ldd); export CC=$(which gcc); export srctree=$(pwd); scripts/kconfig/gconf Kconfig
> > 	Recursive inclusion detected.
> > 	Inclusion path:
> > 	  current file : arch//Kconfig
> > 	  included from: arch//Kconfig:10
> > 
> > but it seems that something else is also needed.
> 
> This worked for me:
> 
> 	SRCARCH=x86 LD=$(which ldd) CC=$(which gcc) srctree=$(pwd) scripts/kconfig/gconf Kconfig

Thank you!
It does work for me as well (except using qconf of course).

Best regards,
	Maxim Levitsky


> 
> Thanks,
> Mauro
> 



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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-25 10:59 ` Mauro Carvalho Chehab
  2020-06-25 11:17   ` Mauro Carvalho Chehab
@ 2020-06-25 13:42   ` Mauro Carvalho Chehab
  2020-06-25 14:52     ` [PATCH] kconfig: qconf: Fix find on split mode Mauro Carvalho Chehab
  1 sibling, 1 reply; 15+ 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] 15+ messages in thread

* [PATCH] kconfig: qconf: Fix find on split mode
  2020-06-25 13:42   ` Mauro Carvalho Chehab
@ 2020-06-25 14:52     ` Mauro Carvalho Chehab
  2020-06-28  2:17       ` Masahiro Yamada
  2020-06-28  8:40       ` Maxim Levitsky
  0 siblings, 2 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-25 14:52 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mauro Carvalho Chehab, 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] 15+ messages in thread

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-25 12:53     ` Maxim Levitsky
@ 2020-06-25 15:05       ` Mauro Carvalho Chehab
  2020-06-28  8:37         ` Maxim Levitsky
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-25 15:05 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-kernel

Em Thu, 25 Jun 2020 15:53:46 +0300
Maxim Levitsky <mlevitsk@redhat.com> escreveu:

> On Thu, 2020-06-25 at 13:17 +0200, Mauro Carvalho Chehab wrote:
> > 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.
> > > >   
> > > 
> > > There are three view modes for qconf:
> > > 
> > > 	- Single
> > > 	- Split
> > > 	- Full
> > > 
> > > those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
> > > Those patches restore the original behavior.  
> You mean xconfig/qconf? (gconf is another program that is GTK based as far as I know).

Yeah, I meant the Qt one (qconfig).

> Could you expalin though what was broken? What exactly didn't work?

Try to switch between the several modes and switch back. There used to
have several broken things there, because the Qt5 port was incomplete.

One of the things that got fixed on the Qt5 fixup series is the helper
window at the bottom. It should now have the same behavior as with the
old Qt3/Qt4 version.

Basically, on split mode, it should have 3 screen areas:

	+------------+-------+
	|            |       |
	| Config     |  menu |
	|            |       |
	+------------+-------+
	|                    |
	| Config description +
	|                    |
	+--------------------+

The contents of the config description should follow up any changes at 
the "menu" part of the split mode, when an item is selected from "menu",
or follow what's selected at "config", when the active window is "config".

The Kernel 3.14 conversion broke the "config description", and caused
several other issues.

When the config description area got fixed, I had to fix each of the
modes, for all of them to update the right area at the screen, as they
were pointing to the wrong places on several parts of the code.

> I do seem to be able to select menus on the left and the config items to the right,
> change the config item values, etc, in the split mode at least with these commits reverted.

You should also be able to see the helper window at the bottom changing
as modes change.

Anyway, the patch I just sent should fix it.

> Could you check that you also have the issue with search in qconf/xconfig?

Yeah, before that patch, search was working only on the two other
modes.

Btw, I'm also using Fedora here (Fedora 32). So, I should have a
result close to what you would be experiencing.

Thanks,
Mauro

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

* Re: [PATCH] kconfig: qconf: Fix find on split mode
  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
  1 sibling, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2020-06-28  2:17 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Kbuild mailing list, Linux Kernel Mailing List, Maxim Levitsky

On Thu, Jun 25, 2020 at 11:53 PM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> 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>
> ---


Applied to linux-kbuild.
Thanks.


>  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
>
>


-- 
Best Regards
Masahiro Yamada

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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-25 15:05       ` Mauro Carvalho Chehab
@ 2020-06-28  8:37         ` Maxim Levitsky
  2020-06-28 10:54           ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Maxim Levitsky @ 2020-06-28  8:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-kernel

On Thu, 2020-06-25 at 17:05 +0200, Mauro Carvalho Chehab wrote:
> Em Thu, 25 Jun 2020 15:53:46 +0300
> Maxim Levitsky <mlevitsk@redhat.com> escreveu:
> 
> > On Thu, 2020-06-25 at 13:17 +0200, Mauro Carvalho Chehab wrote:
> > > 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.
> > > > >   
> > > > 
> > > > There are three view modes for qconf:
> > > > 
> > > > 	- Single
> > > > 	- Split
> > > > 	- Full
> > > > 
> > > > those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
> > > > Those patches restore the original behavior.  
> > You mean xconfig/qconf? (gconf is another program that is GTK based as far as I know).
> 
> Yeah, I meant the Qt one (qconfig).
> 
> > Could you expalin though what was broken? What exactly didn't work?
> 
> Try to switch between the several modes and switch back. There used to
> have several broken things there, because the Qt5 port was incomplete.
> 
> One of the things that got fixed on the Qt5 fixup series is the helper
> window at the bottom. It should now have the same behavior as with the
> old Qt3/Qt4 version.
> 
> Basically, on split mode, it should have 3 screen areas:
> 
> 	+------------+-------+
> 	|            |       |
> 	| Config     |  menu |
> 	|            |       |
> 	+------------+-------+
> 	|                    |
> 	| Config description +
> 	|                    |
> 	+--------------------+
> 
> The contents of the config description should follow up any changes at 
> the "menu" part of the split mode, when an item is selected from "menu",
> or follow what's selected at "config", when the active window is "config".

Dunno. with the 2 b311142fcfd37b58dfec72e040ed04949eb1ac86 and cce1faba82645fee899ccef5b7d3050fed3a3d10,
in split view, I wasn't able to make the 'config description' show anything wrong,
in regard to currently selected item in 'config' and in 'menu'
At that point this is mostly an academic interset for me since,
the patch that you sent fixes search. Thank you very much!

BTW, I re-discovered another bug (I have seen it already but it didn't bother me that much),
while trying to break the version with these commits reverted (but it happens 
with them not reverted as well):

When I enable 'show debug info' to understand why I can't enable/disable some config
option, the hyperlinks in the config description don't work - they make the config
window to be empty.

Best regards and thanks again,
	Maxim Levitsky

> 
> The Kernel 3.14 conversion broke the "config description", and caused
> several other issues.
> 
> When the config description area got fixed, I had to fix each of the
> modes, for all of them to update the right area at the screen, as they
> were pointing to the wrong places on several parts of the code.
> 
> > I do seem to be able to select menus on the left and the config items to the right,
> > change the config item values, etc, in the split mode at least with these commits reverted.
> 
> You should also be able to see the helper window at the bottom changing
> as modes change.
> 
> Anyway, the patch I just sent should fix it.
> 
> > Could you check that you also have the issue with search in qconf/xconfig?
> 
> Yeah, before that patch, search was working only on the two other
> modes.
> 
> Btw, I'm also using Fedora here (Fedora 32). So, I should have a
> result close to what you would be experiencing.
> 
> Thanks,
> Mauro
> 



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

* Re: [PATCH] kconfig: qconf: Fix find on split mode
  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
  1 sibling, 1 reply; 15+ messages in thread
From: Maxim Levitsky @ 2020-06-28  8:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Masahiro Yamada; +Cc: linux-kbuild, linux-kernel

On Thu, 2020-06-25 at 16:52 +0200, Mauro Carvalho Chehab wrote:
> The logic handling find on split mode is currently broken.
> Fix it, making it work again as expected.

I tested this patch and it works well.
There is one really small cosmetic issue:

If you select search result, and then select another search result
which happens not to update the 'menu', then both the results are
selected (that is the old one doesn't clear its selection)

Best regards,
	Maxim Levitsky

> 
> 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:



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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-28  8:37         ` Maxim Levitsky
@ 2020-06-28 10:54           ` Mauro Carvalho Chehab
  2020-06-28 11:20             ` Maxim Levitsky
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-28 10:54 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-kernel

Em Sun, 28 Jun 2020 11:37:08 +0300
Maxim Levitsky <mlevitsk@redhat.com> escreveu:

> On Thu, 2020-06-25 at 17:05 +0200, Mauro Carvalho Chehab wrote:
> > Em Thu, 25 Jun 2020 15:53:46 +0300
> > Maxim Levitsky <mlevitsk@redhat.com> escreveu:
> >   
> > > On Thu, 2020-06-25 at 13:17 +0200, Mauro Carvalho Chehab wrote:  
> > > > 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.
> > > > > >     
> > > > > 
> > > > > There are three view modes for qconf:
> > > > > 
> > > > > 	- Single
> > > > > 	- Split
> > > > > 	- Full
> > > > > 
> > > > > those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
> > > > > Those patches restore the original behavior.    
> > > You mean xconfig/qconf? (gconf is another program that is GTK based as far as I know).  
> > 
> > Yeah, I meant the Qt one (qconfig).
> >   
> > > Could you expalin though what was broken? What exactly didn't work?  
> > 
> > Try to switch between the several modes and switch back. There used to
> > have several broken things there, because the Qt5 port was incomplete.
> > 
> > One of the things that got fixed on the Qt5 fixup series is the helper
> > window at the bottom. It should now have the same behavior as with the
> > old Qt3/Qt4 version.
> > 
> > Basically, on split mode, it should have 3 screen areas:
> > 
> > 	+------------+-------+
> > 	|            |       |
> > 	| Config     |  menu |
> > 	|            |       |
> > 	+------------+-------+
> > 	|                    |
> > 	| Config description +
> > 	|                    |
> > 	+--------------------+
> > 
> > The contents of the config description should follow up any changes at 
> > the "menu" part of the split mode, when an item is selected from "menu",
> > or follow what's selected at "config", when the active window is "config".  
> 
> Dunno. with the 2 b311142fcfd37b58dfec72e040ed04949eb1ac86 and cce1faba82645fee899ccef5b7d3050fed3a3d10,
> in split view, I wasn't able to make the 'config description' show anything wrong,
> in regard to currently selected item in 'config' and in 'menu'

Well, the problem was related to how the code calls those 3 areas
internally: configView, menuView and configInfoView. 

When it is outside the split view, it should hide the
menuView, in order to show just the configView and the configInfoView.

There were lots of weird stuff there. I suspect that, after the
half-done Qt5 conversion (that handled badly the menuView hiding
logic), some hacks were added, assuming the wrong window hiding 
logic. When I fixed it, other things stopped working. So, additional
fixup patches were needed.

> At that point this is mostly an academic interset for me since,
> the patch that you sent fixes search. Thank you very much!

Anytime!

> BTW, I re-discovered another bug (I have seen it already but it didn't bother me that much),
> while trying to break the version with these commits reverted (but it happens 
> with them not reverted as well):
> 
> When I enable 'show debug info' to understand why I can't enable/disable some config
> option, the hyperlinks in the config description don't work - they make the config
> window to be empty.

It sounds that the creation of the search list for the QTextBrowser 
instantiated class (e. g. configInfoView) is not fine.

It sounds that it was supposed to call either setInfo() or
setMenuLink() when a debug info hyperlink is clicked:

	info = new ConfigInfoView(split, name);
	connect(list->list, SIGNAL(menuChanged(struct menu *)),
		info, SLOT(setInfo(struct menu *)));

But this is not happening. Perhaps this also broke with the Qt5
conversion?

I suspect it should, instead, use a different signal to handle it.

See, with the enclosed patch, clicking on a link will now show:

	Clicked on URL QUrl("s0x21c3f10")
	QTextBrowser: No document for s0x21c3f10

Which helps to explain what's happening here.

See, when debug is turned on, it will create hyperlinks like:

	head += QString().sprintf("<a href=\"s%p\">", sym);

It seems that the code needs something like:

	connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
			 helpText, SLOT (clicked (const QUrl &)) );

and a handler for this signal that would translate "s%p"
back into sym, using such value to update the menus.

Do you know if this used to work after Kernel 3.14?

Thanks,
Mauro

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index b8f577c6e8aa..4d9bf9330c73 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -4,27 +4,19 @@
  * Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>
  */
 
-#include <qglobal.h>
-
-#include <QMainWindow>
-#include <QList>
-#include <qtextbrowser.h>
 #include <QAction>
+#include <QApplication>
+#include <QCloseEvent>
+#include <QDebug>
+#include <QDesktopWidget>
 #include <QFileDialog>
+#include <QLabel>
+#include <QLayout>
+#include <QList>
 #include <QMenu>
-
-#include <qapplication.h>
-#include <qdesktopwidget.h>
-#include <qtoolbar.h>
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qmenubar.h>
-#include <qmessagebox.h>
-#include <qregexp.h>
-#include <qevent.h>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QToolBar>
 
 #include <stdlib.h>
 
@@ -400,6 +392,8 @@ void ConfigList::updateSelection(void)
 	struct menu *menu;
 	enum prop_type type;
 
+qInfo() << __FUNCTION__;
+
 	if (mode == symbolMode)
 		setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
 	else
@@ -536,6 +530,8 @@ void ConfigList::setRootMenu(struct menu *menu)
 {
 	enum prop_type type;
 
+
+qInfo() << __FUNCTION__ << "menu:" << menu;
 	if (rootEntry == menu)
 		return;
 	type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
@@ -1020,6 +1016,7 @@ void ConfigView::updateListAll(void)
 ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 	: Parent(parent), sym(0), _menu(0)
 {
+qInfo() << __FUNCTION__;
 	setObjectName(name);
 
 
@@ -1033,6 +1030,7 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 
 void ConfigInfoView::saveSettings(void)
 {
+qInfo() << __FUNCTION__;
 	if (!objectName().isEmpty()) {
 		configSettings->beginGroup(objectName());
 		configSettings->setValue("/showDebug", showDebug());
@@ -1042,6 +1040,7 @@ void ConfigInfoView::saveSettings(void)
 
 void ConfigInfoView::setShowDebug(bool b)
 {
+qInfo() << __FUNCTION__;
 	if (_showDebug != b) {
 		_showDebug = b;
 		if (_menu)
@@ -1054,6 +1053,8 @@ void ConfigInfoView::setShowDebug(bool b)
 
 void ConfigInfoView::setInfo(struct menu *m)
 {
+qInfo() << __FUNCTION__ << "menu:" << m;
+
 	if (_menu == m)
 		return;
 	_menu = m;
@@ -1068,6 +1069,8 @@ void ConfigInfoView::symbolInfo(void)
 {
 	QString str;
 
+qInfo() << __FUNCTION__;
+
 	str += "<big>Symbol: <b>";
 	str += print_filter(sym->name);
 	str += "</b></big><br><br>value: ";
@@ -1085,6 +1088,8 @@ void ConfigInfoView::menuInfo(void)
 	struct symbol* sym;
 	QString head, debug, help;
 
+qInfo() << __FUNCTION__;
+
 	sym = _menu->sym;
 	if (sym) {
 		if (_menu->prompt) {
@@ -1140,6 +1145,7 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
 {
 	QString debug;
 
+qInfo() << __FUNCTION__;
 	debug += "type: ";
 	debug += print_filter(sym_type_name(sym->type));
 	if (sym_is_choice(sym))
@@ -1191,6 +1197,7 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
 
 QString ConfigInfoView::print_filter(const QString &str)
 {
+qInfo() << __FUNCTION__;
 	QRegExp re("[<>&\"\\n]");
 	QString res = str;
 	for (int i = 0; (i = res.indexOf(re, i)) >= 0;) {
@@ -1225,6 +1232,7 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
 	QString* text = reinterpret_cast<QString*>(data);
 	QString str2 = print_filter(str);
 
+qInfo() << __FUNCTION__;
 	if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) {
 		*text += QString().sprintf("<a href=\"s%p\">", sym);
 		*text += str2;
@@ -1233,11 +1241,17 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
 		*text += str2;
 }
 
+void ConfigInfoView::clicked(const QUrl &url)
+{
+	qInfo() << "Clicked on URL" << url;
+}
+
 QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
 {
 	QMenu* popup = Parent::createStandardContextMenu(pos);
 	QAction* action = new QAction("Show Debug Info", popup);
 
+qInfo() << __FUNCTION__;
 	action->setCheckable(true);
 	connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
 	connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
@@ -1249,6 +1263,7 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
 
 void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
 {
+qInfo() << __FUNCTION__;
 	Parent::contextMenuEvent(e);
 }
 
@@ -1258,6 +1273,8 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 	setObjectName(name);
 	setWindowTitle("Search Config");
 
+qInfo() << __FUNCTION__ << "name:" << name;
+
 	QVBoxLayout* layout1 = new QVBoxLayout(this);
 	layout1->setContentsMargins(11, 11, 11, 11);
 	layout1->setSpacing(6);
@@ -1506,6 +1523,9 @@ ConfigMainWindow::ConfigMainWindow(void)
 	helpMenu->addAction(showIntroAction);
 	helpMenu->addAction(showAboutAction);
 
+	connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
+		 helpText, SLOT (clicked (const QUrl &)) );
+
 	connect(configList, SIGNAL(menuChanged(struct menu *)),
 		helpText, SLOT(setInfo(struct menu *)));
 	connect(configList, SIGNAL(menuSelected(struct menu *)),
@@ -1603,6 +1623,7 @@ void ConfigMainWindow::saveConfigAs(void)
 
 void ConfigMainWindow::searchConfig(void)
 {
+qInfo() << __FUNCTION__;
 	if (!searchWindow)
 		searchWindow = new ConfigSearchWindow(this, "search");
 	searchWindow->show();
@@ -1610,6 +1631,11 @@ void ConfigMainWindow::searchConfig(void)
 
 void ConfigMainWindow::changeItens(struct menu *menu)
 {
+qInfo() << __FUNCTION__ << "Changing to menu" << menu;
+
+	if (menu->flags & MENU_ROOT)
+		qInfo() << "Wrong type when changing item";
+
 	configList->setRootMenu(menu);
 
 	if (configList->rootEntry->parent == &rootmenu)
@@ -1620,6 +1646,11 @@ void ConfigMainWindow::changeItens(struct menu *menu)
 
 void ConfigMainWindow::changeMenu(struct menu *menu)
 {
+qInfo() << __FUNCTION__ << "Changing to menu" << menu;
+
+	if (!(menu->flags & MENU_ROOT))
+		qInfo() << "Wrong type when changing menu";
+
 	menuList->setRootMenu(menu);
 
 	if (menuList->rootEntry->parent == &rootmenu)
@@ -1633,6 +1664,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
 	struct menu *parent;
 	ConfigList* list = NULL;
 	ConfigItem* item;
+qInfo() << __FUNCTION__ << "Changing to menu" << menu;
 
 	if (configList->menuSkip(menu))
 		return;
@@ -1681,6 +1713,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
 
 void ConfigMainWindow::listFocusChanged(void)
 {
+qInfo() << __FUNCTION__;
 	if (menuList->mode == menuMode)
 		configList->clearSelection();
 }
@@ -1689,6 +1722,7 @@ void ConfigMainWindow::goBack(void)
 {
 	ConfigItem* item, *oldSelection;
 
+qInfo() << __FUNCTION__;
 	configList->setParentMenu();
 	if (configList->rootEntry == &rootmenu)
 		backAction->setEnabled(false);
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index c879d79ce817..a193137f2314 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -3,17 +3,17 @@
  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
  */
 
-#include <QTextBrowser>
-#include <QTreeWidget>
-#include <QMainWindow>
+#include <QCheckBox>
+#include <QDialog>
 #include <QHeaderView>
-#include <qsettings.h>
+#include <QLineEdit>
+#include <QMainWindow>
 #include <QPushButton>
 #include <QSettings>
-#include <QLineEdit>
 #include <QSplitter>
-#include <QCheckBox>
-#include <QDialog>
+#include <QTextBrowser>
+#include <QTreeWidget>
+
 #include "expr.h"
 
 class ConfigView;
@@ -250,6 +250,7 @@ public slots:
 	void setInfo(struct menu *menu);
 	void saveSettings(void);
 	void setShowDebug(bool);
+	void clicked (const QUrl &url);
 
 signals:
 	void showDebugChanged(bool);




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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-28 10:54           ` Mauro Carvalho Chehab
@ 2020-06-28 11:20             ` Maxim Levitsky
  2020-06-28 11:56               ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Maxim Levitsky @ 2020-06-28 11:20 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-kernel

On Sun, 2020-06-28 at 12:54 +0200, Mauro Carvalho Chehab wrote:
> Em Sun, 28 Jun 2020 11:37:08 +0300
> Maxim Levitsky <mlevitsk@redhat.com> escreveu:
> 
> > On Thu, 2020-06-25 at 17:05 +0200, Mauro Carvalho Chehab wrote:
> > > Em Thu, 25 Jun 2020 15:53:46 +0300
> > > Maxim Levitsky <mlevitsk@redhat.com> escreveu:
> > >   
> > > > On Thu, 2020-06-25 at 13:17 +0200, Mauro Carvalho Chehab wrote:  
> > > > > 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.
> > > > > > >     
> > > > > > 
> > > > > > There are three view modes for qconf:
> > > > > > 
> > > > > > 	- Single
> > > > > > 	- Split
> > > > > > 	- Full
> > > > > > 
> > > > > > those got broken when gconf was converted to use Qt5, back on Kernel 3.14.
> > > > > > Those patches restore the original behavior.    
> > > > You mean xconfig/qconf? (gconf is another program that is GTK based as far as I know).  
> > > 
> > > Yeah, I meant the Qt one (qconfig).
> > >   
> > > > Could you expalin though what was broken? What exactly didn't work?  
> > > 
> > > Try to switch between the several modes and switch back. There used to
> > > have several broken things there, because the Qt5 port was incomplete.
> > > 
> > > One of the things that got fixed on the Qt5 fixup series is the helper
> > > window at the bottom. It should now have the same behavior as with the
> > > old Qt3/Qt4 version.
> > > 
> > > Basically, on split mode, it should have 3 screen areas:
> > > 
> > > 	+------------+-------+
> > > 	|            |       |
> > > 	| Config     |  menu |
> > > 	|            |       |
> > > 	+------------+-------+
> > > 	|                    |
> > > 	| Config description +
> > > 	|                    |
> > > 	+--------------------+
> > > 
> > > The contents of the config description should follow up any changes at 
> > > the "menu" part of the split mode, when an item is selected from "menu",
> > > or follow what's selected at "config", when the active window is "config".  
> > 
> > Dunno. with the 2 b311142fcfd37b58dfec72e040ed04949eb1ac86 and cce1faba82645fee899ccef5b7d3050fed3a3d10,
> > in split view, I wasn't able to make the 'config description' show anything wrong,
> > in regard to currently selected item in 'config' and in 'menu'
> 
> Well, the problem was related to how the code calls those 3 areas
> internally: configView, menuView and configInfoView. 
> 
> When it is outside the split view, it should hide the
> menuView, in order to show just the configView and the configInfoView.
> 
> There were lots of weird stuff there. I suspect that, after the
> half-done Qt5 conversion (that handled badly the menuView hiding
> logic), some hacks were added, assuming the wrong window hiding 
> logic. When I fixed it, other things stopped working. So, additional
> fixup patches were needed.
> 
> > At that point this is mostly an academic interset for me since,
> > the patch that you sent fixes search. Thank you very much!
> 
> Anytime!
> 
> > BTW, I re-discovered another bug (I have seen it already but it didn't bother me that much),
> > while trying to break the version with these commits reverted (but it happens 
> > with them not reverted as well):
> > 
> > When I enable 'show debug info' to understand why I can't enable/disable some config
> > option, the hyperlinks in the config description don't work - they make the config
> > window to be empty.
> 
> It sounds that the creation of the search list for the QTextBrowser 
> instantiated class (e. g. configInfoView) is not fine.
> 
> It sounds that it was supposed to call either setInfo() or
> setMenuLink() when a debug info hyperlink is clicked:
> 
> 	info = new ConfigInfoView(split, name);
> 	connect(list->list, SIGNAL(menuChanged(struct menu *)),
> 		info, SLOT(setInfo(struct menu *)));
> 
> But this is not happening. Perhaps this also broke with the Qt5
> conversion?
> 
> I suspect it should, instead, use a different signal to handle it.
> 
> See, with the enclosed patch, clicking on a link will now show:
> 
> 	Clicked on URL QUrl("s0x21c3f10")
> 	QTextBrowser: No document for s0x21c3f10
> 
> Which helps to explain what's happening here.
> 
> See, when debug is turned on, it will create hyperlinks like:
> 
> 	head += QString().sprintf("<a href=\"s%p\">", sym);
> 
> It seems that the code needs something like:
> 
> 	connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
> 			 helpText, SLOT (clicked (const QUrl &)) );
> 
> and a handler for this signal that would translate "s%p"
> back into sym, using such value to update the menus.
> 
> Do you know if this used to work after Kernel 3.14?

I don't know yet, but I can test it. 

I didn't do much kernel developement for lot of time, so I only vaguely
remember that once upon a time it did work. I don't use this feature much,
so it might as well be broken back when conversion to Qt5 happened.
Also worth noting that I probably used Qt4 untill recently when I updated
to fedora 31, which looks like dropped Qt4 developement packages.

I used to know a thing or two about Qt, long long ago, so on next weekend or so,
I can also take a look at this.

Best regards,
	Maxim Levitsky

> 
> Thanks,
> Mauro
> 
> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> index b8f577c6e8aa..4d9bf9330c73 100644
> --- a/scripts/kconfig/qconf.cc
> +++ b/scripts/kconfig/qconf.cc
> @@ -4,27 +4,19 @@
>   * Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>
>   */
>  
> -#include <qglobal.h>
> -
> -#include <QMainWindow>
> -#include <QList>
> -#include <qtextbrowser.h>
>  #include <QAction>
> +#include <QApplication>
> +#include <QCloseEvent>
> +#include <QDebug>
> +#include <QDesktopWidget>
>  #include <QFileDialog>
> +#include <QLabel>
> +#include <QLayout>
> +#include <QList>
>  #include <QMenu>
> -
> -#include <qapplication.h>
> -#include <qdesktopwidget.h>
> -#include <qtoolbar.h>
> -#include <qlayout.h>
> -#include <qsplitter.h>
> -#include <qlineedit.h>
> -#include <qlabel.h>
> -#include <qpushbutton.h>
> -#include <qmenubar.h>
> -#include <qmessagebox.h>
> -#include <qregexp.h>
> -#include <qevent.h>
> +#include <QMenuBar>
> +#include <QMessageBox>
> +#include <QToolBar>
>  
>  #include <stdlib.h>
>  
> @@ -400,6 +392,8 @@ void ConfigList::updateSelection(void)
>  	struct menu *menu;
>  	enum prop_type type;
>  
> +qInfo() << __FUNCTION__;
> +
>  	if (mode == symbolMode)
>  		setHeaderLabels(QStringList() << "Item" << "Name" << "N" << "M" << "Y" << "Value");
>  	else
> @@ -536,6 +530,8 @@ void ConfigList::setRootMenu(struct menu *menu)
>  {
>  	enum prop_type type;
>  
> +
> +qInfo() << __FUNCTION__ << "menu:" << menu;
>  	if (rootEntry == menu)
>  		return;
>  	type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
> @@ -1020,6 +1016,7 @@ void ConfigView::updateListAll(void)
>  ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
>  	: Parent(parent), sym(0), _menu(0)
>  {
> +qInfo() << __FUNCTION__;
>  	setObjectName(name);
>  
>  
> @@ -1033,6 +1030,7 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
>  
>  void ConfigInfoView::saveSettings(void)
>  {
> +qInfo() << __FUNCTION__;
>  	if (!objectName().isEmpty()) {
>  		configSettings->beginGroup(objectName());
>  		configSettings->setValue("/showDebug", showDebug());
> @@ -1042,6 +1040,7 @@ void ConfigInfoView::saveSettings(void)
>  
>  void ConfigInfoView::setShowDebug(bool b)
>  {
> +qInfo() << __FUNCTION__;
>  	if (_showDebug != b) {
>  		_showDebug = b;
>  		if (_menu)
> @@ -1054,6 +1053,8 @@ void ConfigInfoView::setShowDebug(bool b)
>  
>  void ConfigInfoView::setInfo(struct menu *m)
>  {
> +qInfo() << __FUNCTION__ << "menu:" << m;
> +
>  	if (_menu == m)
>  		return;
>  	_menu = m;
> @@ -1068,6 +1069,8 @@ void ConfigInfoView::symbolInfo(void)
>  {
>  	QString str;
>  
> +qInfo() << __FUNCTION__;
> +
>  	str += "<big>Symbol: <b>";
>  	str += print_filter(sym->name);
>  	str += "</b></big><br><br>value: ";
> @@ -1085,6 +1088,8 @@ void ConfigInfoView::menuInfo(void)
>  	struct symbol* sym;
>  	QString head, debug, help;
>  
> +qInfo() << __FUNCTION__;
> +
>  	sym = _menu->sym;
>  	if (sym) {
>  		if (_menu->prompt) {
> @@ -1140,6 +1145,7 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
>  {
>  	QString debug;
>  
> +qInfo() << __FUNCTION__;
>  	debug += "type: ";
>  	debug += print_filter(sym_type_name(sym->type));
>  	if (sym_is_choice(sym))
> @@ -1191,6 +1197,7 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
>  
>  QString ConfigInfoView::print_filter(const QString &str)
>  {
> +qInfo() << __FUNCTION__;
>  	QRegExp re("[<>&\"\\n]");
>  	QString res = str;
>  	for (int i = 0; (i = res.indexOf(re, i)) >= 0;) {
> @@ -1225,6 +1232,7 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
>  	QString* text = reinterpret_cast<QString*>(data);
>  	QString str2 = print_filter(str);
>  
> +qInfo() << __FUNCTION__;
>  	if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) {
>  		*text += QString().sprintf("<a href=\"s%p\">", sym);
>  		*text += str2;
> @@ -1233,11 +1241,17 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
>  		*text += str2;
>  }
>  
> +void ConfigInfoView::clicked(const QUrl &url)
> +{
> +	qInfo() << "Clicked on URL" << url;
> +}
> +
>  QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
>  {
>  	QMenu* popup = Parent::createStandardContextMenu(pos);
>  	QAction* action = new QAction("Show Debug Info", popup);
>  
> +qInfo() << __FUNCTION__;
>  	action->setCheckable(true);
>  	connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
>  	connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
> @@ -1249,6 +1263,7 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
>  
>  void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
>  {
> +qInfo() << __FUNCTION__;
>  	Parent::contextMenuEvent(e);
>  }
>  
> @@ -1258,6 +1273,8 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
>  	setObjectName(name);
>  	setWindowTitle("Search Config");
>  
> +qInfo() << __FUNCTION__ << "name:" << name;
> +
>  	QVBoxLayout* layout1 = new QVBoxLayout(this);
>  	layout1->setContentsMargins(11, 11, 11, 11);
>  	layout1->setSpacing(6);
> @@ -1506,6 +1523,9 @@ ConfigMainWindow::ConfigMainWindow(void)
>  	helpMenu->addAction(showIntroAction);
>  	helpMenu->addAction(showAboutAction);
>  
> +	connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
> +		 helpText, SLOT (clicked (const QUrl &)) );
> +
>  	connect(configList, SIGNAL(menuChanged(struct menu *)),
>  		helpText, SLOT(setInfo(struct menu *)));
>  	connect(configList, SIGNAL(menuSelected(struct menu *)),
> @@ -1603,6 +1623,7 @@ void ConfigMainWindow::saveConfigAs(void)
>  
>  void ConfigMainWindow::searchConfig(void)
>  {
> +qInfo() << __FUNCTION__;
>  	if (!searchWindow)
>  		searchWindow = new ConfigSearchWindow(this, "search");
>  	searchWindow->show();
> @@ -1610,6 +1631,11 @@ void ConfigMainWindow::searchConfig(void)
>  
>  void ConfigMainWindow::changeItens(struct menu *menu)
>  {
> +qInfo() << __FUNCTION__ << "Changing to menu" << menu;
> +
> +	if (menu->flags & MENU_ROOT)
> +		qInfo() << "Wrong type when changing item";
> +
>  	configList->setRootMenu(menu);
>  
>  	if (configList->rootEntry->parent == &rootmenu)
> @@ -1620,6 +1646,11 @@ void ConfigMainWindow::changeItens(struct menu *menu)
>  
>  void ConfigMainWindow::changeMenu(struct menu *menu)
>  {
> +qInfo() << __FUNCTION__ << "Changing to menu" << menu;
> +
> +	if (!(menu->flags & MENU_ROOT))
> +		qInfo() << "Wrong type when changing menu";
> +
>  	menuList->setRootMenu(menu);
>  
>  	if (menuList->rootEntry->parent == &rootmenu)
> @@ -1633,6 +1664,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
>  	struct menu *parent;
>  	ConfigList* list = NULL;
>  	ConfigItem* item;
> +qInfo() << __FUNCTION__ << "Changing to menu" << menu;
>  
>  	if (configList->menuSkip(menu))
>  		return;
> @@ -1681,6 +1713,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
>  
>  void ConfigMainWindow::listFocusChanged(void)
>  {
> +qInfo() << __FUNCTION__;
>  	if (menuList->mode == menuMode)
>  		configList->clearSelection();
>  }
> @@ -1689,6 +1722,7 @@ void ConfigMainWindow::goBack(void)
>  {
>  	ConfigItem* item, *oldSelection;
>  
> +qInfo() << __FUNCTION__;
>  	configList->setParentMenu();
>  	if (configList->rootEntry == &rootmenu)
>  		backAction->setEnabled(false);
> diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
> index c879d79ce817..a193137f2314 100644
> --- a/scripts/kconfig/qconf.h
> +++ b/scripts/kconfig/qconf.h
> @@ -3,17 +3,17 @@
>   * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
>   */
>  
> -#include <QTextBrowser>
> -#include <QTreeWidget>
> -#include <QMainWindow>
> +#include <QCheckBox>
> +#include <QDialog>
>  #include <QHeaderView>
> -#include <qsettings.h>
> +#include <QLineEdit>
> +#include <QMainWindow>
>  #include <QPushButton>
>  #include <QSettings>
> -#include <QLineEdit>
>  #include <QSplitter>
> -#include <QCheckBox>
> -#include <QDialog>
> +#include <QTextBrowser>
> +#include <QTreeWidget>
> +
>  #include "expr.h"
>  
>  class ConfigView;
> @@ -250,6 +250,7 @@ public slots:
>  	void setInfo(struct menu *menu);
>  	void saveSettings(void);
>  	void setShowDebug(bool);
> +	void clicked (const QUrl &url);
>  
>  signals:
>  	void showDebugChanged(bool);
> 
> 
> 



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

* Re: Search function in xconfig is partially broken after recent changes
  2020-06-28 11:20             ` Maxim Levitsky
@ 2020-06-28 11:56               ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2020-06-28 11:56 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-kernel

Em Sun, 28 Jun 2020 14:20:41 +0300
Maxim Levitsky <mlevitsk@redhat.com> escreveu:

> > But this is not happening. Perhaps this also broke with the Qt5
> > conversion?
> > 
> > I suspect it should, instead, use a different signal to handle it.
> > 
> > See, with the enclosed patch, clicking on a link will now show:
> > 
> > 	Clicked on URL QUrl("s0x21c3f10")
> > 	QTextBrowser: No document for s0x21c3f10
> > 
> > Which helps to explain what's happening here.
> > 
> > See, when debug is turned on, it will create hyperlinks like:
> > 
> > 	head += QString().sprintf("<a href=\"s%p\">", sym);
> > 
> > It seems that the code needs something like:
> > 
> > 	connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
> > 			 helpText, SLOT (clicked (const QUrl &)) );
> > 
> > and a handler for this signal that would translate "s%p"
> > back into sym, using such value to update the menus.
> > 
> > Do you know if this used to work after Kernel 3.14?  
> 
> I don't know yet, but I can test it. 
> 
> I didn't do much kernel developement for lot of time, so I only vaguely
> remember that once upon a time it did work. I don't use this feature much,
> so it might as well be broken back when conversion to Qt5 happened.
> Also worth noting that I probably used Qt4 untill recently when I updated
> to fedora 31, which looks like dropped Qt4 developement packages.
> 
> I used to know a thing or two about Qt, long long ago, so on next weekend or so,
> I can also take a look at this.

Yeah, I suspect you probably tried it before the Qt5 conversion
patches then.

The enclosed patch is one step further fixing this bug. It still
needs to implement the part of the code which starts using the
selected menu or item.

The first hunk won't apply cleanly, because I added a patch
before it, in order to sort out the include mess, but solving
the conflict is trivial (just add an include for QDebug).

Thanks,
Mauro

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 631e19659504..b989b6543d7a 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -7,6 +7,7 @@
 #include <QAction>
 #include <QApplication>
 #include <QCloseEvent>
+#include <QDebug>
 #include <QDesktopWidget>
 #include <QFileDialog>
 #include <QLabel>
@@ -1012,7 +1013,7 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 	: Parent(parent), sym(0), _menu(0)
 {
 	setObjectName(name);
-
+	setOpenLinks(false);
 
 	if (!objectName().isEmpty()) {
 		configSettings->beginGroup(objectName());
@@ -1224,6 +1225,36 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
 		*text += str2;
 }
 
+void ConfigInfoView::clicked(const QUrl &url)
+{
+	QByteArray str = url.toEncoded();
+	const std::size_t count = str.size();
+	char *hex = new char[count];
+	unsigned long p;
+	struct symbol *sym;
+	struct menu *menu;
+
+	if (count < 1)
+		return;
+
+	memcpy(hex, str.constData(), count);
+	p = (int)strtol(hex + 1, NULL, 16);
+
+	if (!p)
+		return;
+
+	qInfo() << "Clicked on URL" << url;
+
+	if (hex[0] == 's') {
+		sym = (struct symbol *)p;
+
+		qInfo() << "symbol name:" << sym->name;
+	} else {
+		menu = (struct menu *)p;
+		qInfo() << "menu:" << qgettext(menu_get_prompt(menu));
+	}
+}
+
 QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
 {
 	QMenu* popup = Parent::createStandardContextMenu(pos);
@@ -1497,6 +1528,9 @@ ConfigMainWindow::ConfigMainWindow(void)
 	helpMenu->addAction(showIntroAction);
 	helpMenu->addAction(showAboutAction);
 
+	connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
+		 helpText, SLOT (clicked (const QUrl &)) );
+
 	connect(configList, SIGNAL(menuChanged(struct menu *)),
 		helpText, SLOT(setInfo(struct menu *)));
 	connect(configList, SIGNAL(menuSelected(struct menu *)),
@@ -1601,6 +1635,9 @@ void ConfigMainWindow::searchConfig(void)
 
 void ConfigMainWindow::changeItens(struct menu *menu)
 {
+	if (menu->flags & MENU_ROOT)
+		qInfo() << "Wrong type when changing item";
+
 	configList->setRootMenu(menu);
 
 	if (configList->rootEntry->parent == &rootmenu)
@@ -1611,6 +1648,9 @@ void ConfigMainWindow::changeItens(struct menu *menu)
 
 void ConfigMainWindow::changeMenu(struct menu *menu)
 {
+	if (!(menu->flags & MENU_ROOT))
+		qInfo() << "Wrong type when changing menu";
+
 	menuList->setRootMenu(menu);
 
 	if (menuList->rootEntry->parent == &rootmenu)
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index d913a02967ae..a193137f2314 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -250,6 +250,7 @@ public slots:
 	void setInfo(struct menu *menu);
 	void saveSettings(void);
 	void setShowDebug(bool);
+	void clicked (const QUrl &url);
 
 signals:
 	void showDebugChanged(bool);

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

* Re: [PATCH] kconfig: qconf: Fix find on split mode
  2020-06-28  8:40       ` Maxim Levitsky
@ 2020-06-28 14:42         ` Masahiro Yamada
  2020-06-30  3:53           ` Masahiro Yamada
  0 siblings, 1 reply; 15+ messages in thread
From: Masahiro Yamada @ 2020-06-28 14:42 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: Mauro Carvalho Chehab, Linux Kbuild mailing list,
	Linux Kernel Mailing List

On Sun, Jun 28, 2020 at 5:40 PM Maxim Levitsky <mlevitsk@redhat.com> wrote:
>
> On Thu, 2020-06-25 at 16:52 +0200, Mauro Carvalho Chehab wrote:
> > The logic handling find on split mode is currently broken.
> > Fix it, making it work again as expected.
>
> I tested this patch and it works well.
> There is one really small cosmetic issue:
>
> If you select search result, and then select another search result
> which happens not to update the 'menu', then both the results are
> selected (that is the old one doesn't clear its selection)

I see this too.
So, this can be improved somehow...



>
> Best regards,
>         Maxim Levitsky
>
> >
> > 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:
>
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kconfig: qconf: Fix find on split mode
  2020-06-28 14:42         ` Masahiro Yamada
@ 2020-06-30  3:53           ` Masahiro Yamada
  0 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2020-06-30  3:53 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: Mauro Carvalho Chehab, Linux Kbuild mailing list,
	Linux Kernel Mailing List

On Sun, Jun 28, 2020 at 11:42 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sun, Jun 28, 2020 at 5:40 PM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> >
> > On Thu, 2020-06-25 at 16:52 +0200, Mauro Carvalho Chehab wrote:
> > > The logic handling find on split mode is currently broken.
> > > Fix it, making it work again as expected.
> >
> > I tested this patch and it works well.
> > There is one really small cosmetic issue:
> >
> > If you select search result, and then select another search result
> > which happens not to update the 'menu', then both the results are
> > selected (that is the old one doesn't clear its selection)
>
> I see this too.
> So, this can be improved somehow...



I dropped this one
because it was superseded by the new version.


-- 
Best Regards
Masahiro Yamada

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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25  9:25 Search function in xconfig is partially broken after recent changes Maxim Levitsky
2020-06-25 10:59 ` Mauro Carvalho Chehab
2020-06-25 11:17   ` Mauro Carvalho Chehab
2020-06-25 12:53     ` Maxim Levitsky
2020-06-25 15:05       ` Mauro Carvalho Chehab
2020-06-28  8:37         ` Maxim Levitsky
2020-06-28 10:54           ` Mauro Carvalho Chehab
2020-06-28 11:20             ` Maxim Levitsky
2020-06-28 11:56               ` Mauro Carvalho Chehab
2020-06-25 13:42   ` 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.