Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: qconf: fix support for the split view mode

At least on my tests (building against Qt5.13), it seems to
me that, since Kernel 3.14, the split view mode is broken.

Maybe it was not a top priority during the conversion time.

Anyway, this patch changes the logic in order to properly
support the split view mode and the single view mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Masahiro Yamada
b311142f cce1faba

+28 -7
+26 -7
scripts/kconfig/qconf.cc
··· 742 742 type = menu->prompt ? menu->prompt->type : P_UNKNOWN; 743 743 if (type == P_MENU && rootEntry != menu && 744 744 mode != fullMode && mode != menuMode) { 745 - emit menuSelected(menu); 745 + if (mode == menuMode) 746 + emit menuSelected(menu); 747 + else 748 + emit itemSelected(menu); 746 749 break; 747 750 } 748 751 case Qt::Key_Space: ··· 852 849 if (!menu) 853 850 goto skip; 854 851 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; 855 - if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) 856 - emit menuSelected(menu); 857 - else if (menu->sym) 852 + if (ptype == P_MENU) { 853 + if (mode == singleMode) 854 + emit itemSelected(menu); 855 + else if (mode == symbolMode) 856 + emit menuSelected(menu); 857 + } else if (menu->sym) 858 858 changeValue(item); 859 859 860 860 skip: ··· 1509 1503 helpText, SLOT(setInfo(struct menu *))); 1510 1504 connect(configList, SIGNAL(menuSelected(struct menu *)), 1511 1505 SLOT(changeMenu(struct menu *))); 1506 + connect(configList, SIGNAL(itemSelected(struct menu *)), 1507 + SLOT(changeItens(struct menu *))); 1512 1508 connect(configList, SIGNAL(parentSelected()), 1513 1509 SLOT(goBack())); 1514 1510 connect(menuList, SIGNAL(menuChanged(struct menu *)), ··· 1607 1599 searchWindow->show(); 1608 1600 } 1609 1601 1610 - void ConfigMainWindow::changeMenu(struct menu *menu) 1602 + void ConfigMainWindow::changeItens(struct menu *menu) 1611 1603 { 1612 1604 configList->setRootMenu(menu); 1605 + 1613 1606 if (configList->rootEntry->parent == &rootmenu) 1607 + backAction->setEnabled(false); 1608 + else 1609 + backAction->setEnabled(true); 1610 + } 1611 + 1612 + void ConfigMainWindow::changeMenu(struct menu *menu) 1613 + { 1614 + menuList->setRootMenu(menu); 1615 + 1616 + if (menuList->rootEntry->parent == &rootmenu) 1614 1617 backAction->setEnabled(false); 1615 1618 else 1616 1619 backAction->setEnabled(true); ··· 1736 1717 fullViewAction->setEnabled(true); 1737 1718 fullViewAction->setChecked(false); 1738 1719 1739 - configList->mode = symbolMode; 1720 + configList->mode = menuMode; 1740 1721 if (configList->rootEntry == &rootmenu) 1741 1722 configList->updateListAll(); 1742 1723 else 1743 1724 configList->setRootMenu(&rootmenu); 1744 1725 configList->setAllOpen(true); 1745 1726 configApp->processEvents(); 1746 - menuList->mode = menuMode; 1727 + menuList->mode = symbolMode; 1747 1728 menuList->setRootMenu(&rootmenu); 1748 1729 menuList->setAllOpen(true); 1749 1730 menuView->show();
+2
scripts/kconfig/qconf.h
··· 71 71 signals: 72 72 void menuChanged(struct menu *menu); 73 73 void menuSelected(struct menu *menu); 74 + void itemSelected(struct menu *menu); 74 75 void parentSelected(void); 75 76 void gotFocus(struct menu *); 76 77 ··· 299 298 ConfigMainWindow(void); 300 299 public slots: 301 300 void changeMenu(struct menu *); 301 + void changeItens(struct menu *); 302 302 void setMenuLink(struct menu *); 303 303 void listFocusChanged(void); 304 304 void goBack(void);