From patchwork Fri Aug 7 09:18:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89E9B1392 for ; Fri, 7 Aug 2020 09:21:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 717DC22C9F for ; Fri, 7 Aug 2020 09:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792063; bh=DMEUnGWXCxDB9FusoShrs0uRuWClPbV19iPYiWhgqJ4=; h=From:To:Cc:Subject:Date:List-ID:From; b=STo2Yy38YFb9PSHRJybEn1Q7YEUWHDNqs/QsMvc6bJO6x0UO3yRCPwxCXiJD6gzX+ 5aHHi1EW3ihqXJScOOKRI5YaIzXt/TRf1csMPJvcEJOrrnjtfp3QlRT9ku/884vFA9 3Aen1ZcAYkhwU48xjk6Vlyv7/zOFboYCPG4PjA1g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727969AbgHGJTh (ORCPT ); Fri, 7 Aug 2020 05:19:37 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41486 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727897AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBPv032147; Fri, 7 Aug 2020 18:19:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBPv032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791951; bh=PmJ0GVxR3KXmtIUW/pYRqsxX2UAZbsS3qkoMiv7ZHE8=; h=From:To:Cc:Subject:Date:From; b=BN/fPfN9+CsRd7c5l6WGpeN/qLi5F++n1lharkHduu8WFNWBXjJ9udGRsVOdwTPbH i8TET+gjnrMTVPFrHVLD8//hQIJJH801jrgHjbFmL0NLSmMegvGQelpDVeW8QMl4u7 FJKRHFEl45dAblwo6mHRhHlKsIwPhFN6lAKHUAqJgD5h6zRijDPaUskqwbGKO13S8m YuG+teVXj/xr/mf+gUV/B+JFfVJHvSImPXdhDwDxrgyB6ETMXsIYLXw0kG0BhjhyBo uSv4Ok8UIOHc2FmC9gKoRDkCPYh7no5TsLoeqQBr8+Gse7Oz5+1slkawHmnezmrxle XxSFmKx4GsvWw== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 01/19] kconfig: qconf: remove ->addSeparator() to menuBar Date: Fri, 7 Aug 2020 18:18:51 +0900 Message-Id: <20200807091909.2985787-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org I do not understand the purpose of this ->addSeparator(). It does not make any difference. Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch scripts/kconfig/qconf.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 23d1cb01a41a..55023a9e8315 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1540,7 +1540,6 @@ ConfigMainWindow::ConfigMainWindow(void) optionMenu->addAction(showDebugAction); // create help menu - menu->addSeparator(); QMenu* helpMenu = menu->addMenu("&Help"); helpMenu->addAction(showIntroAction); helpMenu->addAction(showAboutAction); From patchwork Fri Aug 7 09:18:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705255 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0EC01392 for ; Fri, 7 Aug 2020 09:21:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA71220855 for ; Fri, 7 Aug 2020 09:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792083; bh=jeuYHNRSriwBF5HifFO62VgYfoSu2ohoTBxAbmIAGKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kHmNsL8UgWKn2CleQ2s0Bzvg3PSxqhl5QyVz5IsYaASBhat5BNjP4q1Z/JochZL1Q edrxl3djLm7t2Psl0PZXNlI9ENDDoBmc74SA8mEoerkm1g61xKCLQHQXXwdWHcWPyw ovJlYTWnvH6TsSTWdB6oUFeUTpABsdveRAJMvdBk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728326AbgHGJVE (ORCPT ); Fri, 7 Aug 2020 05:21:04 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41478 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727838AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBPw032147; Fri, 7 Aug 2020 18:19:12 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBPw032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791952; bh=ejkNoCkwee2SrbatlcPdlyRlA7xLolSLizTlHDa1NkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZmW2SF02W+2wAfduGqEZ6gr9OT+2REIejZ3yr5H8yP74FUjnP7UvmoA7XX/CWrTnp hk0Rgp0nZNj4Pky6Bx1ltT0NNMko46bYaVuoI2nstfpv4rLvAPL1aNeOukozRmI01y kuZtl25L9jjX5R5uJB0v8bwbRn5QpwmoCOQUn//4i5Jckjn3wvNGmL2MWBBrGFAcIY 5YEmYRAoaJmxXVQ6C+KTHyLeyU/yy0VMNzVUueHAzVNUt4hLbBDIlfY9jMuE5UXJDB zR7rBtzcsVR92TqAJY0QMaAgFrWcexKPa7GSJtOp1JlCxbXmjoCqMZzs6ksaWOdSXQ YXY6PWIWtXJGw== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 02/19] kconfig: qconf: do not use 'menu' variable for (QMenuBar *) Date: Fri, 7 Aug 2020 18:18:52 +0900 Message-Id: <20200807091909.2985787-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org I think it is a bit confusing to use 'menu' to hold a QMenuBar pointer. I want to use 'menu' for a QMenu pointer. You do not need to use a local variable here. Use menuBar() directly. Signed-off-by: Masahiro Yamada --- Changes in v2: - change subject scripts/kconfig/qconf.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 55023a9e8315..aa2792f4ac46 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1381,7 +1381,6 @@ void ConfigSearchWindow::search(void) ConfigMainWindow::ConfigMainWindow(void) : searchWindow(0) { - QMenuBar* menu; bool ok = true; QVariant x, y; int width, height; @@ -1432,7 +1431,6 @@ ConfigMainWindow::ConfigMainWindow(void) setTabOrder(configList, helpText); configList->setFocus(); - menu = menuBar(); toolBar = new QToolBar("Tools", this); addToolBar(toolBar); @@ -1518,7 +1516,7 @@ ConfigMainWindow::ConfigMainWindow(void) toolBar->addAction(fullViewAction); // create config menu - QMenu* config = menu->addMenu("&File"); + QMenu* config = menuBar()->addMenu("&File"); config->addAction(loadAction); config->addAction(saveAction); config->addAction(saveAsAction); @@ -1526,12 +1524,13 @@ ConfigMainWindow::ConfigMainWindow(void) config->addAction(quitAction); // create edit menu - QMenu* editMenu = menu->addMenu("&Edit"); + QMenu* editMenu = menuBar()->addMenu("&Edit"); editMenu->addAction(searchAction); // create options menu - QMenu* optionMenu = menu->addMenu("&Option"); + QMenu* optionMenu = menuBar()->addMenu("&Option"); optionMenu->addAction(showNameAction); + optionMenu->addAction(showRangeAction); optionMenu->addAction(showDataAction); optionMenu->addSeparator(); @@ -1540,7 +1539,7 @@ ConfigMainWindow::ConfigMainWindow(void) optionMenu->addAction(showDebugAction); // create help menu - QMenu* helpMenu = menu->addMenu("&Help"); + QMenu* helpMenu = menuBar()->addMenu("&Help"); helpMenu->addAction(showIntroAction); helpMenu->addAction(showAboutAction); From patchwork Fri Aug 7 09:18:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705219 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 650E4618 for ; Fri, 7 Aug 2020 09:19:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 491D220855 for ; Fri, 7 Aug 2020 09:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791979; bh=JMVA6QZopZKOZFfRtHPxuyJo8cFY0bidgmNHNbGochc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=LKaqaLttc0BSL9ZZIK91JxHIXIHmTFGIlDKkRHur4Adsphy/mtVNdTwUPaaNepIS8 egA1hHXTBBhpI9jFyl8IMCUnX/AcHOyut6VP0KarrkOq3l3QLzXuhJ4MSOE0UegtXw Dg5N9yc8E4lK2eAGkd93cZRxw8PHRB3MjRyoWPfs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728004AbgHGJTi (ORCPT ); Fri, 7 Aug 2020 05:19:38 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41481 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727843AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBPx032147; Fri, 7 Aug 2020 18:19:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBPx032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791953; bh=l6uF0cV4W2EhnygKik53RY21xJuQdqw7BWYuhjEKF/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P+RqlobI6lW91VFUhdS9vUc2cI+Nk7wwJOcrJfh8P0XLiUlTXySwBZLxfi0RCfAyr l2dziH41osxyOkEpjsXgoYBTLB+0ctmHRSvThYmlCDLxQhj/QaZji+nEepboDgMwEn Wyoh2V/J/HGSG8cWNoy7V8y5GOJEjE69f2GBxS0w5QQFEdpQOI1RZcvprvOpJojFmX QLi0qWDjwX7FQlVJbK+t+QG2LIYyAWeCfeRF8f5YRH74obSa6FQQyATUbTHGnTR7r7 HfNstP99E6XfvWHK9GAf2Gg2ofgEv2WgkoILZZ9srsGlMe5WG5RMsNPDzetAtBTPRM cpoEBTf6BvmuA== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 03/19] kconfig: qconf: use 'menu' variable for (QMenu *) Date: Fri, 7 Aug 2020 18:18:53 +0900 Message-Id: <20200807091909.2985787-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The variable 'config' for the file menu is inconsistent. You do not need to use different variables. Use 'menu' for every menu. Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch scripts/kconfig/qconf.cc | 41 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index aa2792f4ac46..2f7c13a758b6 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1515,33 +1515,32 @@ ConfigMainWindow::ConfigMainWindow(void) toolBar->addAction(splitViewAction); toolBar->addAction(fullViewAction); - // create config menu - QMenu* config = menuBar()->addMenu("&File"); - config->addAction(loadAction); - config->addAction(saveAction); - config->addAction(saveAsAction); - config->addSeparator(); - config->addAction(quitAction); + // create file menu + QMenu *menu = menuBar()->addMenu("&File"); + menu->addAction(loadAction); + menu->addAction(saveAction); + menu->addAction(saveAsAction); + menu->addSeparator(); + menu->addAction(quitAction); // create edit menu - QMenu* editMenu = menuBar()->addMenu("&Edit"); - editMenu->addAction(searchAction); + menu = menuBar()->addMenu("&Edit"); + menu->addAction(searchAction); // create options menu - QMenu* optionMenu = menuBar()->addMenu("&Option"); - optionMenu->addAction(showNameAction); - - optionMenu->addAction(showRangeAction); - optionMenu->addAction(showDataAction); - optionMenu->addSeparator(); - optionMenu->addActions(optGroup->actions()); - optionMenu->addSeparator(); - optionMenu->addAction(showDebugAction); + menu = menuBar()->addMenu("&Option"); + menu->addAction(showNameAction); + menu->addAction(showRangeAction); + menu->addAction(showDataAction); + menu->addSeparator(); + menu->addActions(optGroup->actions()); + menu->addSeparator(); + menu->addAction(showDebugAction); // create help menu - QMenu* helpMenu = menuBar()->addMenu("&Help"); - helpMenu->addAction(showIntroAction); - helpMenu->addAction(showAboutAction); + menu = menuBar()->addMenu("&Help"); + menu->addAction(showIntroAction); + menu->addAction(showAboutAction); connect (helpText, SIGNAL (anchorClicked (const QUrl &)), helpText, SLOT (clicked (const QUrl &)) ); From patchwork Fri Aug 7 09:18:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705217 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92D73175A for ; Fri, 7 Aug 2020 09:19:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FDF820855 for ; Fri, 7 Aug 2020 09:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791977; bh=y+UA5p3ED5L0oldnwtzdnO0tQj+s1KsXDxuIDsqtj9E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WJpjc4sr8riFuWCAizUZ1TkR0Ou1oVHG1nZWdza2KOPfJvj/jTDpFoChbAq1Iwd7a zFQSUQfGIg9s+xH7Pzc2sWs7oHO7nIR9qWFPb9TjeCN18fw5rkL14BeSzKZ9gmCuxW Rz+XjXvHP+UMkbUNfiVdYlUd0UZHVvuqcKmu+Lt4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727936AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41484 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727821AbgHGJTf (ORCPT ); Fri, 7 Aug 2020 05:19:35 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ0032147; Fri, 7 Aug 2020 18:19:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ0032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791954; bh=mpfNPfPqiVao3oZ/c3NU7ZKvxQ18iH//rapEaLj9PUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v30nadyfDA8UYzFtmonPfnRZG28HBDhwm6GYLzUmd/0iRRTkiSvB8l0bONPmZ3oN2 Zjg8P1EgKKnWjqkEccf9pI/clA2GPsxJjthDSzqmI2wVNPtKglGiuCcNSd+PFin4a6 cyqNUIOz1fWq5JHKm3Zzg0BTL2Da0Y7S/HG8l/ToG+S4o1x2wk3xHmKpQ3OYzm5sFw WxrWG8tiCjW2NFSAZGUg6DIU0WzbmBn2OpZxWVxDSdEP5/KxBkWARdC7vzxRlHo5UK 87/+nu0LDYm741p9ShQTRqpVLc9xMKpZ2I2XSC9mF6W23tuS11ytMCe5IxGRnJSwu4 M+JC0IflpRpcA== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 04/19] kconfig: qconf: remove toolBar from ConfigMainWindow members Date: Fri, 7 Aug 2020 18:18:54 +0900 Message-Id: <20200807091909.2985787-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org This pointer is only used in the ConfigMainWindow constructor. Drop it from the private members. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 2 +- scripts/kconfig/qconf.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 2f7c13a758b6..b4f32199e0df 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1431,7 +1431,7 @@ ConfigMainWindow::ConfigMainWindow(void) setTabOrder(configList, helpText); configList->setFocus(); - toolBar = new QToolBar("Tools", this); + QToolBar *toolBar = new QToolBar("Tools", this); addToolBar(toolBar); backAction = new QAction(QPixmap(xpm_back), "Back", this); diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 5eeab4a8bb43..b80683998635 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -326,7 +326,6 @@ public slots: ConfigView *configView; ConfigList *configList; ConfigInfoView *helpText; - QToolBar *toolBar; QAction *backAction; QAction *singleViewAction; QAction *splitViewAction; From patchwork Fri Aug 7 09:18:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705213 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6935618 for ; Fri, 7 Aug 2020 09:19:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF0C1221E5 for ; Fri, 7 Aug 2020 09:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791976; bh=wHEX8SV/6qyWDHYup2Kr6fgbIr8JiKA4gMob7FgBrSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HlD4KLVkcovF5IY3E1NubOg3hgxsNYBP88Yl/PPGT4hxC5sKogHFCpt4CCrTRhqLi HWv/UFPfikS7EoHIGhJ9UnNKDZ04M95CwxCG3hKzt+XhhFY2P7wzGYYkEknfDPJcCJ RznMzZ+JtWKqK9AjwkiEGGCgxBUT+RKAkunRXA1E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41485 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727037AbgHGJTf (ORCPT ); Fri, 7 Aug 2020 05:19:35 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ1032147; Fri, 7 Aug 2020 18:19:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ1032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791955; bh=JVeY+lZTgfed2xMudnwbriYDO7ghha4ZbXi0Duc0vcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pJXmMtD924wU0Od0S0fHunemS5zFp6+ADAl9dmAkYZ0xVhCyV/PSkZVquakqWyGC3 QUAAEdtWZgwDYsujy/O4jeicRkJM+BMExhrFVW8RUAgOHEJ+q8dW2j7vU5n+3K0Qiq YAXMsNfOuMnTIhmeha/cE8fRuCliQgoey/rX9bDw69syG8NdC83982A7CareN9KZIS /7PeeuPNqv57sHSMgN+J0H1I08C7pLXgJz97wvLgWbeQWYFNndlWFKnVksScy/GFKV wcAvr/t4JbiWQK97u2YvLt8DMLZfk9X0UDHFY7ognQutHY5c6tFGvRwhAxym5PiWs7 pSVu9C1ylc5ew== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 05/19] kconfig: qconf: overload addToolBar() to create and insert toolbar Date: Fri, 7 Aug 2020 18:18:55 +0900 Message-Id: <20200807091909.2985787-5-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Use the overloaded function, addToolBar(const QString &title) to create a QToolBar object, setting its window title, and inserts it into the toolbar area. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index b4f32199e0df..0385804cfd08 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1431,9 +1431,6 @@ ConfigMainWindow::ConfigMainWindow(void) setTabOrder(configList, helpText); configList->setFocus(); - QToolBar *toolBar = new QToolBar("Tools", this); - addToolBar(toolBar); - backAction = new QAction(QPixmap(xpm_back), "Back", this); connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); @@ -1506,6 +1503,7 @@ ConfigMainWindow::ConfigMainWindow(void) connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); // init tool bar + QToolBar *toolBar = addToolBar("Tools"); toolBar->addAction(backAction); toolBar->addSeparator(); toolBar->addAction(loadAction); From patchwork Fri Aug 7 09:18:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 209FD1392 for ; Fri, 7 Aug 2020 09:19:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0952A20855 for ; Fri, 7 Aug 2020 09:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791977; bh=rayCLryKPpPKBu9/9sd60KyfJNb42Dkn1KQtpLzSMis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kp6yOlf0XxKIWdbSj/EqQPLtZxgU1N7wvl7MzuDM/cArLfR+wuz0akD/XV7u6paxu JSmSJN5iUzd01y46A5gN924wyJHm6pQAJ2wetJmt6ctvIeANo/REDd4aBoVOa3ZGxB Dl68dP1qq0FInAy4tS6DZMBcsP8xgDEoxORSguw4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41480 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbgHGJTf (ORCPT ); Fri, 7 Aug 2020 05:19:35 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ2032147; Fri, 7 Aug 2020 18:19:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ2032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791956; bh=TXoaOYE/LqjQwMgElir8ZhV7uTIN1YLGXs2By2r4H68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jpp0pfSKHqg3iR6DIdQ3ByOKWKcS1v849BolOsuqjqAS2r+twMPyiN2sUpbFURzYv /rOt83P9NbKZlIVXGilhEqtPIuA4BPyWhYw3PyoKVgK37iieZ4mR/y8UNG3+OvguTG uWQ/3VNV+U9f6GVtza49b7P1Nt5embxk/2nAcyAlH6yOiJAOdnSLRH9rg9q8D+gQ5f ifWjE7w3Hi08+GF9/RJx1e1zUHM2HwPMxrBkE/SIVAIZeBJac044nLa7AK9gQ6rXv7 3dLbA2vbi6dYmtuOAet8/0/qBJkryOzQLETEAIIqB270cp59xMSJQBLR7qAIH3Stv+ 3tDIkNAhCBxUg== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 06/19] kconfig: qconf: remove unused ConfigList::listView() Date: Fri, 7 Aug 2020 18:18:56 +0900 Message-Id: <20200807091909.2985787-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org I do not know how this function can be useful. In fact, it is unsed. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index b80683998635..6e6bb0a96348 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -88,10 +88,6 @@ public slots: updateList(NULL); updateAll = false; } - ConfigList* listView() - { - return this; - } void addColumn(colIdx idx) { showColumn(idx); From patchwork Fri Aug 7 09:18:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705257 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 850801392 for ; Fri, 7 Aug 2020 09:21:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F93D2177B for ; Fri, 7 Aug 2020 09:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792084; bh=ckEJ4HSlgG7falhdJg4K5cIcx8Qimd0ClgnycEf57NM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=r43ZpP8Gu27HS6UaQwO1HmQOUMTWySOSikIsC82EACuBn+NIwvoEuDI7I4AKUSBZa grZXZMwMUjo1vn2qD1M0/6u1M/Xk3C0MoBBq9HRCxXSCFmyKjkhv7h2PkNnJ5WsUFN SAgz1K5u/VUQqMpJs+CtNHZsodBGehIaPsRZ6s8o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728323AbgHGJVE (ORCPT ); Fri, 7 Aug 2020 05:21:04 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41479 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ3032147; Fri, 7 Aug 2020 18:19:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ3032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791957; bh=VixrBR5qEPvzJaLnnx8ujPP6BniNaD2d3j9IPcWEQO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wIDbO67xDlwUHhIr5vuwgART+SJBGetEr9poFpcUuplduasXsyFjwX33drGqTJT9n MBNrm7H6BPZQcfQsghfMO05yDVFoTYg7gyhsckcgkt5WUoKbx40EtpkrTao52kPpju LvZMXO0gVlFlanrCBakeCKo2p8yKnfMAdfSAJBup4cK9wsA3YNEYbLfeHpnDZcm5+G MPWirm1qrHHa/1WAbHYdiLVbFFGAgf7cCDw3edmjmjVRqrJ2sd8HHACRvxG7cn7/cO nyoUJLAUtptUFZwxZH030RHXuQ2Yw9GbMc4og1lJSiW/WPilmYLMoaGxMnb5cm4Lxz hgwqFJRwiKD/w== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 07/19] kconfig: qconf: remove name from ConfigSearchWindow constructor Date: Fri, 7 Aug 2020 18:18:57 +0900 Message-Id: <20200807091909.2985787-7-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org This constructor is only called with "search" as the second argument. Hard-code the name in the constructor, and drop it from the function argument. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 44 +++++++++++++++++++--------------------- scripts/kconfig/qconf.h | 2 +- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 0385804cfd08..a4b522bb32e5 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1287,10 +1287,10 @@ void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e) Parent::contextMenuEvent(e); } -ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) +ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent) : Parent(parent), result(NULL) { - setObjectName(name); + setObjectName("search"); setWindowTitle("Search Config"); QVBoxLayout* layout1 = new QVBoxLayout(this); @@ -1311,9 +1311,9 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam split = new QSplitter(this); split->setOrientation(Qt::Vertical); - list = new ConfigView(split, name); + list = new ConfigView(split, "search"); list->list->mode = listMode; - info = new ConfigInfoView(split, name); + info = new ConfigInfoView(split, "search"); connect(list->list, SIGNAL(menuChanged(struct menu *)), info, SLOT(setInfo(struct menu *))); connect(list->list, SIGNAL(menuChanged(struct menu *)), @@ -1321,25 +1321,23 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam layout1->addWidget(split); - if (name) { - QVariant x, y; - int width, height; - bool ok; + QVariant x, y; + int width, height; + bool ok; - configSettings->beginGroup(name); - width = configSettings->value("/window width", parent->width() / 2).toInt(); - height = configSettings->value("/window height", parent->height() / 2).toInt(); - resize(width, height); - x = configSettings->value("/window x"); - y = configSettings->value("/window y"); - if ((x.isValid())&&(y.isValid())) - move(x.toInt(), y.toInt()); - QList sizes = configSettings->readSizes("/split", &ok); - if (ok) - split->setSizes(sizes); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } + configSettings->beginGroup("search"); + width = configSettings->value("/window width", parent->width() / 2).toInt(); + height = configSettings->value("/window height", parent->height() / 2).toInt(); + resize(width, height); + x = configSettings->value("/window x"); + y = configSettings->value("/window y"); + if (x.isValid() && y.isValid()) + move(x.toInt(), y.toInt()); + QList sizes = configSettings->readSizes("/split", &ok); + if (ok) + split->setSizes(sizes); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); } void ConfigSearchWindow::saveSettings(void) @@ -1641,7 +1639,7 @@ void ConfigMainWindow::saveConfigAs(void) void ConfigMainWindow::searchConfig(void) { if (!searchWindow) - searchWindow = new ConfigSearchWindow(this, "search"); + searchWindow = new ConfigSearchWindow(this); searchWindow->show(); } diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 6e6bb0a96348..335f0776984f 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -272,7 +272,7 @@ class ConfigSearchWindow : public QDialog { Q_OBJECT typedef class QDialog Parent; public: - ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); + ConfigSearchWindow(ConfigMainWindow *parent); public slots: void saveSettings(void); From patchwork Fri Aug 7 09:18:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC5E713B6 for ; Fri, 7 Aug 2020 09:21:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B66342177B for ; Fri, 7 Aug 2020 09:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792065; bh=x7UlWOuX0TRD3nvFZCJitShQJuAQ8DJOUsHy16v2y8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qv08zaJ1IujZ4lF1nTcUi2Bqoislt50G483PP/H/8s1wfVLHYlKwCjWr7mrcfs8tK jWZku9+bkLM9xCaFaKBdc0B95bjpD6YmrL1LDU8Nkq9SVG155W8paJQYaL2h/1ZfhU MFGh7bab8tz7NXsNqhmTTdcdJg9BJLTYh/Wuzqnc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728330AbgHGJVF (ORCPT ); Fri, 7 Aug 2020 05:21:05 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41483 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727874AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ4032147; Fri, 7 Aug 2020 18:19:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ4032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791958; bh=AtaO72kIEhCNgoEFY9X5BFXl6EJl/6Ls5KeH6V0Uaek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kH2DXN07MY/6qlwup6uvDfLgSzdsAmu0BAUY/rJ5BK96v4geFmVf+YgDTw91GdVLq 13uH0g7B/jKX/Fi6LKx/xwMaEj9Me0fs80hJ/kSOHFdyElBSIzzzdbIP4xr6hA+yib oVmv3Aygy18zatt3iYJoi18SpaAjGTcEzBvlPegEax5P3512Ci+TjR07K/jEKUJP2J A7RrhaJERbhGHvW6zAOpH0iPX7rDiBlZUKyoi84wmcwGRhcuvuYnVzj1DCRsiitm7O Fm71td8gIH9QyhuDL/aknT4oJjTGybe8ckU1zeZIfenNJfYxlVyD5JUXv2woWf8Z/O py/hTtSibio3Q== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 08/19] kconfig: qconf: omit parent to QHBoxLayout() Date: Fri, 7 Aug 2020 18:18:58 +0900 Message-Id: <20200807091909.2985787-8-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Instead of passing 0 (i.e. nullptr), leave it empty. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index a4b522bb32e5..0b93db2d61aa 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1296,7 +1296,8 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent) QVBoxLayout* layout1 = new QVBoxLayout(this); layout1->setContentsMargins(11, 11, 11, 11); layout1->setSpacing(6); - QHBoxLayout* layout2 = new QHBoxLayout(0); + + QHBoxLayout* layout2 = new QHBoxLayout(); layout2->setContentsMargins(0, 0, 0, 0); layout2->setSpacing(6); layout2->addWidget(new QLabel("Find:", this)); From patchwork Fri Aug 7 09:18:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705251 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82EE81392 for ; Fri, 7 Aug 2020 09:21:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E78C22C9F for ; Fri, 7 Aug 2020 09:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792065; bh=ArXZfMLzpJBw8O0Hzt6GiokB589sF6f4hSyc89wVJ/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PyatWVpYitNVZXjqmybi3jrzCtJ+0dYfmFRlv3lGQQGE1Lt+quvAycFrTY1aOy58l q2K4CwkuQzxnnm2tkP51WwmIuDF/t5cQhVHwZE4+8uf/IavKtPVtZOEVZZbdw69pN0 ++2sNy9VdES054adSLGTLC0i7mvDhwKqkZF9YnRY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728328AbgHGJVF (ORCPT ); Fri, 7 Aug 2020 05:21:05 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41487 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ5032147; Fri, 7 Aug 2020 18:19:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ5032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791959; bh=wcQtGbOj9XhHI6wWL7vZJQ63g4ziMw2pUhgbDBbdCek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rmu7h0Asv4aQ4U6rI66EVNpzQXcJu1zZ9z99DYPzKb12bPs45M9ESQCHAalLonq5R dQr42LisLxu0V31JDp/NrplWi0dNCwmM75cofKox0t59sKKWufwpM5r6TWAVpjEg3h zVq22PV85x2g7KkqaljOyp3KU9PnZRbUdVmeAkb/Y4/UFW87zgRbyK2dtx1sUKXNkW eUuJiuk68+zNu+cCQOfARqeo41dRkggwFMRXcAg2B/rkpLEfJztR0/VorCNpYFr1nT MFLGBBQTHlFHO2XvJ7RVaGT3C62tY8DCjzqNPe4M7yuSTFm1IRK7sP1Mj26FG2OZEd XymffCisAm4Cg== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 09/19] kconfig: qconf: remove unused argument from ConfigList::updateList() Date: Fri, 7 Aug 2020 18:18:59 +0900 Message-Id: <20200807091909.2985787-9-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org This function allocates 'item' before using it, so the argument 'item' is always shadowed. Remove the meaningless argument. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 6 +++--- scripts/kconfig/qconf.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 0b93db2d61aa..8455f81e101f 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -404,15 +404,15 @@ void ConfigList::updateSelection(void) emit menuSelected(menu); } -void ConfigList::updateList(ConfigItem* item) +void ConfigList::updateList() { ConfigItem* last = 0; + ConfigItem *item; if (!rootEntry) { if (mode != listMode) goto update; QTreeWidgetItemIterator it(this); - ConfigItem* item; while (*it) { item = (ConfigItem*)(*it); @@ -989,7 +989,7 @@ void ConfigView::updateList(ConfigItem* item) ConfigView* v; for (v = viewList; v; v = v->nextView) - v->list->updateList(item); + v->list->updateList(); } void ConfigView::updateListAll(void) diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 335f0776984f..4dc5d34a6bca 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -69,7 +69,7 @@ class ConfigList : public QTreeWidget { public slots: void setRootMenu(struct menu *menu); - void updateList(ConfigItem *item); + void updateList(); void setValue(ConfigItem* item, tristate val); void changeValue(ConfigItem* item); void updateSelection(void); @@ -85,7 +85,7 @@ public slots: void updateListAll(void) { updateAll = true; - updateList(NULL); + updateList(); updateAll = false; } void addColumn(colIdx idx) From patchwork Fri Aug 7 09:19:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705249 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCD221392 for ; Fri, 7 Aug 2020 09:21:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DF6C2177B for ; Fri, 7 Aug 2020 09:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792064; bh=pZf8DLNhLYLbG770gDKVIrtBnLM+2YNSPpia3Hm3Gmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kHbFrbcY4yKilflh+CX/19l5wGTkwbFPnnbniS1A+AOrtl69omh9Sgi1tfuhl65ZV CdjlhZuRiUBg4IQX0I2aXxsr5UQGRJe4bp5sv5v5+wRjfWGaIdak48amH5JuXlXrpU 2tLkMT/0yJfqzf9YfiQIKUSeK61M1OXoXFokkhZA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbgHGJVE (ORCPT ); Fri, 7 Aug 2020 05:21:04 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41482 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbgHGJTg (ORCPT ); Fri, 7 Aug 2020 05:19:36 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ6032147; Fri, 7 Aug 2020 18:19:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ6032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791960; bh=OJZVNA6euqkx7rsPqqxzydbAOptXcAX7qWXilCkQ26g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O4+whdfdrb1C0o7yjIV0cZWuIa01a2tZa+F2O/HuYEvh1N8ApMHqvqRt8GGmLktJh anumilIRAwaAajJ7HQigmUR47T7Lg3h14L70uugs1JKsNYbRGySoRDRecd6rBIyvpO oTw9Z6fgbrJYYJ9uCkK/qsNrOUigvTE9v08HJFa+PZq4cBsurqOD+HlPgS/CQWZ7wF hltjlmCvxuqZGU6brOnlOD47UTDl2F0ArMeYbLSxkRt1Y9uXe50e2KRiCKK19xnolZ 7V176TfdmGjrM6haU1hluXScXEj2Haj/vS0rjP0duTghOh2cFGNTZl0zF7LQ9VoYQu 219a1uXppzOFg== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 10/19] kconfig: qconf: remove unused argument from ConfigView::updateList() Date: Fri, 7 Aug 2020 18:19:00 +0900 Message-Id: <20200807091909.2985787-10-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Now that ConfigList::updateList() takes no argument, the 'item' argument ConfigView::updateList() is no longer used. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 8 ++++---- scripts/kconfig/qconf.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 8455f81e101f..808bc311e335 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -280,7 +280,7 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e) case Qt::Key_Return: case Qt::Key_Enter: sym_set_string_value(item->menu->sym, text().toLatin1()); - parent()->updateList(item); + parent()->updateList(); break; default: Parent::keyPressEvent(e); @@ -471,7 +471,7 @@ void ConfigList::setValue(ConfigItem* item, tristate val) return; if (oldval == no && item->menu->list) item->setExpanded(true); - parent()->updateList(item); + parent()->updateList(); break; } } @@ -505,7 +505,7 @@ void ConfigList::changeValue(ConfigItem* item) item->setExpanded(true); } if (oldexpr != newexpr) - parent()->updateList(item); + parent()->updateList(); break; case S_INT: case S_HEX: @@ -984,7 +984,7 @@ void ConfigList::setAllOpen(bool open) } } -void ConfigView::updateList(ConfigItem* item) +void ConfigView::updateList() { ConfigView* v; diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 4dc5d34a6bca..6d06ec399ff0 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -210,7 +210,7 @@ class ConfigView : public QWidget { public: ConfigView(QWidget* parent, const char *name = 0); ~ConfigView(void); - static void updateList(ConfigItem* item); + static void updateList(); static void updateListAll(void); bool showName(void) const { return list->showName; } From patchwork Fri Aug 7 09:19:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705233 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F39F13B6 for ; Fri, 7 Aug 2020 09:20:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 052BE2177B for ; Fri, 7 Aug 2020 09:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792001; bh=PCCMQ+e8IOq/n7lHMEagBTG2jDrHDhpxYyFVZyI+vLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=oURKwA7rd3k4XJNexNODlj4eP+iHRPM+tzRMB2Go8LvDxghy7W0P+fX2hygYU/xfN vNJ8UOyxcYQ9wonAefUFu/qju/I7Z6QYhAgBVrS9w6k4Q8jMStYMOiJ4PAbPhN4YVf 5EImCjlXk+b/Kqp/1ckWv6t76tGtAhEI62m/J3EA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728216AbgHGJT7 (ORCPT ); Fri, 7 Aug 2020 05:19:59 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41591 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727978AbgHGJTk (ORCPT ); Fri, 7 Aug 2020 05:19:40 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ7032147; Fri, 7 Aug 2020 18:19:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ7032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791961; bh=EJhoMRVdg1iJz0MBe3Kh5K5U+at9Y10mnIWZA0y2KL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m+Uzc6mPyPLS/bwDdxzoFNlqCTEyjgY41G6c6Xmko6mEpkBGCdch8/jmnBpulnOYz w/VwujH7yyZqlcl608uxOC/WZ71tSDKUNit+mt9P8D3NYi/oVW0qYy+MzJiiBLkjy0 0cJ3hfXu+AuujTsK/W3EHflObQ4Odcb59oXh+8/ay8YFrTlkqdfyd9umpXVFOLVfus poXt9wMuCzj7GxIHc4sUhopJArR3NLcyP0NMO8FKJuR/ME4zlFeKded6regXZ9+GS4 I0toRGnm3Njb5ldyVsrxIIx1+qwuGkq4g9GWNIG7IYGcLcmBjfxlSEl1xaHyUkUxi3 auPHhSK88GJMg== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 11/19] kconfig: qconf: remove 'parent' from ConfigList::updateMenuList() Date: Fri, 7 Aug 2020 18:19:01 +0900 Message-Id: <20200807091909.2985787-11-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org All the call-sites of this function pass 'this' to the first argument. So, 'parent' is always the 'this' pointer. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 18 +++++++++--------- scripts/kconfig/qconf.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 808bc311e335..604f7855b070 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -446,7 +446,7 @@ void ConfigList::updateList() return; } update: - updateMenuList(this, rootEntry); + updateMenuList(rootEntry); update(); resizeColumnToContents(0); } @@ -524,7 +524,7 @@ void ConfigList::setRootMenu(struct menu *menu) type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; if (type != P_MENU) return; - updateMenuList(this, 0); + updateMenuList(0); rootEntry = menu; updateListAll(); if (currentItem()) { @@ -628,7 +628,7 @@ hide: } } -void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) +void ConfigList::updateMenuList(struct menu* menu) { struct menu* child; ConfigItem* item; @@ -637,19 +637,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) enum prop_type type; if (!menu) { - while (parent->topLevelItemCount() > 0) + while (topLevelItemCount() > 0) { - delete parent->takeTopLevelItem(0); + delete takeTopLevelItem(0); } return; } - last = (ConfigItem*)parent->topLevelItem(0); + last = (ConfigItem*)topLevelItem(0); if (last && !last->goParent) last = 0; for (child = menu->list; child; child = child->next) { - item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); + item = last ? last->nextSibling() : (ConfigItem*)topLevelItem(0); type = child->prompt ? child->prompt->type : P_UNKNOWN; switch (mode) { @@ -670,7 +670,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) if (!child->sym && !child->list && !child->prompt) continue; if (!item || item->menu != child) - item = new ConfigItem(parent, last, child, visible); + item = new ConfigItem(this, last, child, visible); else item->testUpdateMenu(visible); @@ -683,7 +683,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) } hide: if (item && item->menu == child) { - last = (ConfigItem*)parent->topLevelItem(0); + last = (ConfigItem*)topLevelItem(0); if (last == item) last = 0; else while (last->nextSibling() != item) diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 6d06ec399ff0..952bd98d7912 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -102,7 +102,7 @@ public slots: bool menuSkip(struct menu *); void updateMenuList(ConfigItem *parent, struct menu*); - void updateMenuList(ConfigList *parent, struct menu*); + void updateMenuList(struct menu *menu); bool updateAll; From patchwork Fri Aug 7 09:19:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A62811392 for ; Fri, 7 Aug 2020 09:21:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9039F2177B for ; Fri, 7 Aug 2020 09:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792061; bh=taNbGV1s+WsvssYEnTWNWm1NJW4IOkVZ5ZMeNigoG9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sjhwBIh+jqZgi6iWTIiuVaTWRvaHf2TCS8j0UtUJjJp+5YyEKiVAg5mssS8HeQjL7 7QrgcFW6MvtSDYsRLrv4Bvx6rBu+50WfXTMN3Xkxj4LqWnJhu/7abe/n5aDcslJFkq qZpcUsQienUtWvZfI//4MMga5T3V4PS2vak/abcY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728197AbgHGJU6 (ORCPT ); Fri, 7 Aug 2020 05:20:58 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41594 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727986AbgHGJTk (ORCPT ); Fri, 7 Aug 2020 05:19:40 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ8032147; Fri, 7 Aug 2020 18:19:21 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ8032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791962; bh=4uKyPxqgpR7kYRHZT9Kv76QwzC1/t5RlOrA5ow9oRUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MbAtpUCKwwX8Quug095DvEZBNhJuh65aWZzHVxTvgYYI0ldnI1KWbUUL/JffouoOK x7ASvoNe8ef/OVvQOxSv+D1hsNOWhzqLPcn8MRwY3rXVUkSlLnfaoTZmZjnd5fiBwA y550SKz0eTZwNPsFJNLzMwqbzPDLFQA1n0MAvzuio5iyHf8e1hjqtWwOcpHwCP6HDz +YJHo3RsJvv2OGoJ896xJzK0VCEuACWbNtM/85mL49hTRSrSlWct4+0PHrfCIk7Afj nwik3e/XOQ6FYdawxF26RTMNyYcpIylQ09FhyQCc2ebXKv0oj70iWzAewSETwTbiY9 iDJoO1Yy9u98g== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 12/19] kconfig: qconf: drop more localization code Date: Fri, 7 Aug 2020 18:19:02 +0900 Message-Id: <20200807091909.2985787-12-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org This is a remnant of commit 694c49a7c01c ("kconfig: drop localization support"). Get it back to the code prior to commit 3b9fa0931dd8 ("[PATCH] Kconfig i18n support"). Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 604f7855b070..230ce621d85b 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -31,11 +31,6 @@ static ConfigSettings *configSettings; QAction *ConfigMainWindow::saveAction; -static inline QString qgettext(const char* str) -{ - return QString::fromLocal8Bit(str); -} - ConfigSettings::ConfigSettings() : QSettings("kernel.org", "qconf") { @@ -109,7 +104,7 @@ void ConfigItem::updateMenu(void) sym = menu->sym; prop = menu->prompt; - prompt = qgettext(menu_get_prompt(menu)); + prompt = menu_get_prompt(menu); if (prop) switch (prop->type) { case P_MENU: @@ -135,7 +130,7 @@ void ConfigItem::updateMenu(void) if (!sym) goto set_prompt; - setText(nameColIdx, QString::fromLocal8Bit(sym->name)); + setText(nameColIdx, sym->name); type = sym_get_type(sym); switch (type) { @@ -265,7 +260,7 @@ void ConfigLineEdit::show(ConfigItem* i) { item = i; if (sym_get_string_value(item->menu->sym)) - setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); + setText(sym_get_string_value(item->menu->sym)); else setText(QString()); Parent::show(); From patchwork Fri Aug 7 09:19:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705229 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7802618 for ; Fri, 7 Aug 2020 09:19:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B052B22D00 for ; Fri, 7 Aug 2020 09:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791999; bh=ULAXQmntZdDf57Ccm8GuMSgIUGTzbP/arW17SUP4d5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=L9s3Y8NWqQTbnS1aMCtLPriwAJghpFqQZsDT1ymf7FYflA8oeGZIaXyQJVh5eIm/N ycwpqBDmmYFhk/ErN09TdesJeGdhU8NX+RxYNz3gONFfdmsRJ6fYbeV/yyKgUj2+Md jKNaeR4dtlvTQavpKcaiSHzv+4+Uy7VmJnSJHfHM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728207AbgHGJT6 (ORCPT ); Fri, 7 Aug 2020 05:19:58 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41595 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727990AbgHGJTk (ORCPT ); Fri, 7 Aug 2020 05:19:40 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQ9032147; Fri, 7 Aug 2020 18:19:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQ9032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791962; bh=ruoGdXxpfuF5Ao/NO55rH8BOT8e4cequmOPosNxZzGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xEykM3Vk05LeOIFlZwX75FtlFzlVlGVDp4rp+9ASdgfPzYYG4+SsB8XclztLZY0dm lEMbZhQ1w56gL9SwPe5vA7lofMKYbH408lswWHq8AvC+hzkt+Yqv7CiHDWRBj5yvEL bSEAHutI/0L7N9wEcjV9ij7OhOb7Td6o5/Z8NuijV+N03HMpCJL3ieiZRrNniuGdgY R0MPP+2WremIDmN7SbgEFjoilF7zNd2SE4HlMi2/Q+vPyrcCpLdDKao3wZ0YJD4bId bfEzg/OPLHKTyt7zwlTFyklvHG3rDh2oWeBBWzetJ0UwLgF60i5nGdFOpOXDYP/mMv 0bbiTY1Q5iwgw== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 13/19] kconfig: qconf: remove ConfigItem::pixmap/setPixmap Date: Fri, 7 Aug 2020 18:19:03 +0900 Message-Id: <20200807091909.2985787-13-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Use QTreeWidgetItem::icon/setIcon directly. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 22 +++++++++++----------- scripts/kconfig/qconf.h | 8 -------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 230ce621d85b..56b5cdd8b1c9 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -97,7 +97,7 @@ void ConfigItem::updateMenu(void) list = listView(); if (goParent) { - setPixmap(promptColIdx, list->menuBackPix); + setIcon(promptColIdx, list->menuBackPix); prompt = ".."; goto set_prompt; } @@ -114,15 +114,15 @@ void ConfigItem::updateMenu(void) */ if (sym && list->rootEntry == menu) break; - setPixmap(promptColIdx, list->menuPix); + setIcon(promptColIdx, list->menuPix); } else { if (sym) break; - setPixmap(promptColIdx, QIcon()); + setIcon(promptColIdx, QIcon()); } goto set_prompt; case P_COMMENT: - setPixmap(promptColIdx, QIcon()); + setIcon(promptColIdx, QIcon()); goto set_prompt; default: ; @@ -139,7 +139,7 @@ void ConfigItem::updateMenu(void) char ch; if (!sym_is_changeable(sym) && list->optMode == normalOpt) { - setPixmap(promptColIdx, QIcon()); + setIcon(promptColIdx, QIcon()); setText(noColIdx, QString()); setText(modColIdx, QString()); setText(yesColIdx, QString()); @@ -149,22 +149,22 @@ void ConfigItem::updateMenu(void) switch (expr) { case yes: if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setPixmap(promptColIdx, list->choiceYesPix); + setIcon(promptColIdx, list->choiceYesPix); else - setPixmap(promptColIdx, list->symbolYesPix); + setIcon(promptColIdx, list->symbolYesPix); setText(yesColIdx, "Y"); ch = 'Y'; break; case mod: - setPixmap(promptColIdx, list->symbolModPix); + setIcon(promptColIdx, list->symbolModPix); setText(modColIdx, "M"); ch = 'M'; break; default: if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setPixmap(promptColIdx, list->choiceNoPix); + setIcon(promptColIdx, list->choiceNoPix); else - setPixmap(promptColIdx, list->symbolNoPix); + setIcon(promptColIdx, list->symbolNoPix); setText(noColIdx, "N"); ch = 'N'; break; @@ -769,7 +769,7 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e) idx = header()->logicalIndexAt(x); switch (idx) { case promptColIdx: - icon = item->pixmap(promptColIdx); + icon = item->icon(promptColIdx); if (!icon.isNull()) { int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly. if (x >= off && x < off + icon.availableSizes().first().width()) { diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 952bd98d7912..5cda89a51740 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -172,14 +172,6 @@ class ConfigItem : public QTreeWidgetItem { { return Parent::text(idx); } - void setPixmap(colIdx idx, const QIcon &icon) - { - Parent::setIcon(idx, icon); - } - const QIcon pixmap(colIdx idx) const - { - return icon(idx); - } // TODO: Implement paintCell ConfigItem* nextItem; From patchwork Fri Aug 7 09:19:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705223 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6461D618 for ; Fri, 7 Aug 2020 09:19:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E3A422CAF for ; Fri, 7 Aug 2020 09:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791996; bh=1gRM7WcrezYD46EQiAzCWuXjNxmgD4F8L0KFb84P0OU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=YIFhBGWRaezFzA26U+WQad7Q1nK9QyDzNpscJluv0/PS+7OajC3asyaQ7sl2DWWhF 9jYpyNb54czCXphhS/HNiRe0+zmJmQqKl4sTVetVZXIj/O/ez09vxEZR9LreAqV6Pt BiD+saiN+N147qb3i0odbHxzXmBJZiYIasQFOUaU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbgHGJTm (ORCPT ); Fri, 7 Aug 2020 05:19:42 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41597 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728003AbgHGJTl (ORCPT ); Fri, 7 Aug 2020 05:19:41 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQA032147; Fri, 7 Aug 2020 18:19:23 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQA032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791963; bh=BVTMN4LAdRMgBfNC+zBOHVAbvF2zmdeoZJN01upM2bU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bw5R/WPbADMT1mvPdOOZ01NI4TWmg3l20wQpyxbYrJRh3Tkb1rMIfyIKxUWn2A94a gjumf0aNaIWdx0yPM/3hrlMzcBo1hM878nH/R1HYu+5jOEKGkftIvBI8i2B964nlpn ZgLugdta9kOq99dDLZ0rg8F/OPqj6MUAZ9AKsZu8RX+VHLh1L4URijftBla0tgxR7H ogZEdOxd+xnWaBTMDJmvtKTWliAi3GPc/Z8VSXUzrOZs7TrenGZKz2JpDIAhPgyV/9 Eueb4qk9GvNiCF/NReU2vC1Xv5Q8N4YUcIMJgOo2qBkmO8wVduPbHogxG/06uqLFXh Cx9P2PfOYgEyw== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 14/19] kconfig: qconf: remove ConfigList::addColumn/removeColumn Date: Fri, 7 Aug 2020 18:19:04 +0900 Message-Id: <20200807091909.2985787-14-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Use QTreeView::showColumn/hideColumn directly. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 22 +++++++++++----------- scripts/kconfig/qconf.h | 8 -------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 56b5cdd8b1c9..04da1397575a 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -317,7 +317,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name) connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); } - addColumn(promptColIdx); + showColumn(promptColIdx); reinit(); } @@ -335,21 +335,21 @@ bool ConfigList::menuSkip(struct menu *menu) void ConfigList::reinit(void) { - removeColumn(dataColIdx); - removeColumn(yesColIdx); - removeColumn(modColIdx); - removeColumn(noColIdx); - removeColumn(nameColIdx); + hideColumn(dataColIdx); + hideColumn(yesColIdx); + hideColumn(modColIdx); + hideColumn(noColIdx); + hideColumn(nameColIdx); if (showName) - addColumn(nameColIdx); + showColumn(nameColIdx); if (showRange) { - addColumn(noColIdx); - addColumn(modColIdx); - addColumn(yesColIdx); + showColumn(noColIdx); + showColumn(modColIdx); + showColumn(yesColIdx); } if (showData) - addColumn(dataColIdx); + showColumn(dataColIdx); updateListAll(); } diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 5cda89a51740..daa180bdb9b4 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -88,14 +88,6 @@ public slots: updateList(); updateAll = false; } - void addColumn(colIdx idx) - { - showColumn(idx); - } - void removeColumn(colIdx idx) - { - hideColumn(idx); - } void setAllOpen(bool open); void setParentMenu(void); From patchwork Fri Aug 7 09:19:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705225 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC952618 for ; Fri, 7 Aug 2020 09:19:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D51A422D00 for ; Fri, 7 Aug 2020 09:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791998; bh=Ro9R/gp3AVVCyODr7xn3Gvxc4f3BVHLLzxo2gr9JwoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=URH9UJqPYnbwL3jkl35GzrAi+HaEzsvhcfIxvC5xdwfwSfi0SV01IEOU6jj/81uK9 xR2kN9dCoW9xxwbaNOMdQN0nxRHLE///Hji4BYatIz6lyA8BQMuHTmru+ev73VZznq l6Fvwi1ZyeOQlnyK3XaPZyiQ6YsXyQd7gXk2YqYk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727982AbgHGJT6 (ORCPT ); Fri, 7 Aug 2020 05:19:58 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41592 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727987AbgHGJTk (ORCPT ); Fri, 7 Aug 2020 05:19:40 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQB032147; Fri, 7 Aug 2020 18:19:23 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQB032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791963; bh=m09tCtobZs6F9i2lClFwAMkbk3NBVdznuOEPMyEcKcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRl03qCgJ7HnTqgXJycxhlM8D8UFwFjLFN1INtql72UfWEF7ffrOOku5fWSo2alGh V146t8by7eJzrS/nH25DPEL1HS+r6MMD6FnFRfq92L0vfV0qsFF1U/E1eOSLpK9uL2 j42N9s1YhEXLWm8ioy8owZLCwdh+gYHtKWN6aAt3mIKyEWHyguD0fN/Ssq0fB2nOE0 cyURGrbj78Sz501sV/+obs5O0yDB3kO2VRCLNAwyhtDyDD+NcTKCMWKt4vYm4m3ebH mbbG6K0Zggo4+KmeUZg4pcSRt8tWsgZPsz8Dz3wkjGD6eD+r+6n5BsH6Aa97edlVhC /zVonC+au1gDg== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 15/19] kconfig: qconf: remove ConfigItem::text/setText Date: Fri, 7 Aug 2020 18:19:05 +0900 Message-Id: <20200807091909.2985787-15-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Use QTreeWidgetItem::text/setText directly Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index daa180bdb9b4..012414dcdee5 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -156,14 +156,6 @@ class ConfigItem : public QTreeWidgetItem { return ret; } - void setText(colIdx idx, const QString& text) - { - Parent::setText(idx, text); - } - QString text(colIdx idx) const - { - return Parent::text(idx); - } // TODO: Implement paintCell ConfigItem* nextItem; From patchwork Fri Aug 7 09:19:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705231 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A66C13B6 for ; Fri, 7 Aug 2020 09:20:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD9D22177B for ; Fri, 7 Aug 2020 09:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791999; bh=bnwHregWeNIz2L126k+XEbDTwIw/jd2B+q7bRPagxYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=e1g6oN7GBuopjJ0QYmueEx18Xnyi1hokRLasAdv6OezkRd3n93tBna0+Vlk4zw4G6 vjMu0KMTcQgZKtlCk8D3dHt9QvLvQzi/KA3hirObhyk+ydGVnHSNsWiSH/Sfl26+6a Lvkv2wQ4GRQ03+DdbIjG9cSDE1jN7G5G9utEi9w4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbgHGJT7 (ORCPT ); Fri, 7 Aug 2020 05:19:59 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41596 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728001AbgHGJTk (ORCPT ); Fri, 7 Aug 2020 05:19:40 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQC032147; Fri, 7 Aug 2020 18:19:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQC032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791964; bh=w3KzcbrgyiETrQqPWYtQBGT5ncK4Sw4Cv5ADwewuI0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XuI4BpKpwUpsd06Bm4AwQGojdP5uoeov/PesL6MDs2YYXstst4LlCwMOyjVoq95ES 8AMfnM+kTG7yhuiSpGbKEcnPbZM5i5zsK56vqEqgffox5qdrSH9EWLHeDZRgfzpxpF 1jr8kfRcGjLXjDhfCmukal/TiJryvRK1EKWE5GG8g0RxLvOQ/1+BZz6jcEdEDYtGRk FOg44eIDQqb0kuF5cXoZqGC/ARQjkyecvJOZzq0qEH8PKR59cyLMQj0rCLwUAmtt8i hMz6DC+Aw1UQ61fTcnKKwIiGHPZyZr0xWqwUtf8WzhntWgXkg/gUrO5gxOzjEq2Y1g 1yS0Bj5ezpsRg== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 16/19] kconfig: qconf: remove unused voidPix, menuInvPix Date: Fri, 7 Aug 2020 18:19:06 +0900 Message-Id: <20200807091909.2985787-16-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org These are initialized, but not used by anyone. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 2 +- scripts/kconfig/qconf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 04da1397575a..90b618785239 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -291,7 +291,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name) updateAll(false), symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), - menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), + menuPix(xpm_menu), menuBackPix(xpm_menuback), showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), rootEntry(0), headerPopup(0) { diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 012414dcdee5..c46a79a69001 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -100,7 +100,7 @@ public slots: QPixmap symbolYesPix, symbolModPix, symbolNoPix; QPixmap choiceYesPix, choiceNoPix; - QPixmap menuPix, menuInvPix, menuBackPix, voidPix; + QPixmap menuPix, menuBackPix; bool showName, showRange, showData; enum listMode mode; From patchwork Fri Aug 7 09:19:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705227 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F5FB1392 for ; Fri, 7 Aug 2020 09:19:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3591222D00 for ; Fri, 7 Aug 2020 09:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596791999; bh=BE1vMKKwecJnQs6wQPQaQMBpBfDe2CfZYhxI0ceSKX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gKWYWxbZS2sgsztNZS26ECD1zK7FCz4dUN4h9CZrJvbioVvGyy7I3jzCtXLmWp2pp dW/RZjLmGnBBKPZWtp5bqfgArvFblrYApj50t80n6/o/m2dWQSDNdBLDcUkyeqFoj5 dGMYBfW+q163ky157er4WI2hAvF3j/I+6szjVuX8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728204AbgHGJT6 (ORCPT ); Fri, 7 Aug 2020 05:19:58 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41593 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727979AbgHGJTk (ORCPT ); Fri, 7 Aug 2020 05:19:40 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQD032147; Fri, 7 Aug 2020 18:19:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQD032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791965; bh=ip028Ys+1XuhC727EvA1DiIeDJuyfL2ax2HjydvDfv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tvbGc3qRW7ZYz4oS/IW9t9peeRnNIyxyBWgWuYMHU+bvBlTq3dzhkSD74QEA2F4SV glCbwLc9ssru2FbAkE03xh7XWw8MoROuxu4zlgJIC1FA4zNUHwE9/DoS7UuJG6rG5Q G3ZIlwThyhMxiRLRkKALFJAsznQ2dDzO/pVSNvp4IuIUl614FUCmVdWQV4Sw/XFGJC EVsjyjuHwj5JTWaz5Yug4ludJ+vawqHosogf+owOZrSrkKahCdAGnxHqvpxs9+04kW S/fzbHjuZkG4/RaH+URkvhwLdnxyW55mMbX4b4l68ksi4GFa2vZnBM+n3ZmIs3yVDK DWNiqfOCW0VRw== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 17/19] kconfig: qconf: refactor icon setups Date: Fri, 7 Aug 2020 18:19:07 +0900 Message-Id: <20200807091909.2985787-17-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org These icon data are used by ConfigItem, but stored in each instance of ConfigView. There is no point to keep the same data in each of 3 instances, "menu", "config", and "search". Move the icon data to the more relevant ConfigItem class, and make them static members. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/kconfig/qconf.cc | 33 +++++++++++++++++++++++---------- scripts/kconfig/qconf.h | 8 ++++---- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 90b618785239..19f7764c1d68 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -74,6 +74,13 @@ bool ConfigSettings::writeSizes(const QString& key, const QList& value) return true; } +QIcon ConfigItem::symbolYesIcon; +QIcon ConfigItem::symbolModIcon; +QIcon ConfigItem::symbolNoIcon; +QIcon ConfigItem::choiceYesIcon; +QIcon ConfigItem::choiceNoIcon; +QIcon ConfigItem::menuIcon; +QIcon ConfigItem::menubackIcon; /* * set the new data @@ -97,7 +104,7 @@ void ConfigItem::updateMenu(void) list = listView(); if (goParent) { - setIcon(promptColIdx, list->menuBackPix); + setIcon(promptColIdx, menubackIcon); prompt = ".."; goto set_prompt; } @@ -114,7 +121,7 @@ void ConfigItem::updateMenu(void) */ if (sym && list->rootEntry == menu) break; - setIcon(promptColIdx, list->menuPix); + setIcon(promptColIdx, menuIcon); } else { if (sym) break; @@ -149,22 +156,22 @@ void ConfigItem::updateMenu(void) switch (expr) { case yes: if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setIcon(promptColIdx, list->choiceYesPix); + setIcon(promptColIdx, choiceYesIcon); else - setIcon(promptColIdx, list->symbolYesPix); + setIcon(promptColIdx, symbolYesIcon); setText(yesColIdx, "Y"); ch = 'Y'; break; case mod: - setIcon(promptColIdx, list->symbolModPix); + setIcon(promptColIdx, symbolModIcon); setText(modColIdx, "M"); ch = 'M'; break; default: if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setIcon(promptColIdx, list->choiceNoPix); + setIcon(promptColIdx, choiceNoIcon); else - setIcon(promptColIdx, list->symbolNoPix); + setIcon(promptColIdx, symbolNoIcon); setText(noColIdx, "N"); ch = 'N'; break; @@ -289,9 +296,6 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e) ConfigList::ConfigList(ConfigView* p, const char *name) : Parent(p), updateAll(false), - symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), - choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), - menuPix(xpm_menu), menuBackPix(xpm_menuback), showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), rootEntry(0), headerPopup(0) { @@ -1395,6 +1399,15 @@ ConfigMainWindow::ConfigMainWindow(void) if ((x.isValid())&&(y.isValid())) move(x.toInt(), y.toInt()); + // set up icons + ConfigItem::symbolYesIcon = QIcon(QPixmap(xpm_symbol_yes)); + ConfigItem::symbolModIcon = QIcon(QPixmap(xpm_symbol_mod)); + ConfigItem::symbolNoIcon = QIcon(QPixmap(xpm_symbol_no)); + ConfigItem::choiceYesIcon = QIcon(QPixmap(xpm_choice_yes)); + ConfigItem::choiceNoIcon = QIcon(QPixmap(xpm_choice_no)); + ConfigItem::menuIcon = QIcon(QPixmap(xpm_menu)); + ConfigItem::menubackIcon = QIcon(QPixmap(xpm_menuback)); + QWidget *widget = new QWidget(this); QVBoxLayout *layout = new QVBoxLayout(widget); setCentralWidget(widget); diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index c46a79a69001..460b858b0faa 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -98,10 +98,6 @@ public slots: bool updateAll; - QPixmap symbolYesPix, symbolModPix, symbolNoPix; - QPixmap choiceYesPix, choiceNoPix; - QPixmap menuPix, menuBackPix; - bool showName, showRange, showData; enum listMode mode; enum optionMode optMode; @@ -162,6 +158,10 @@ class ConfigItem : public QTreeWidgetItem { struct menu *menu; bool visible; bool goParent; + + static QIcon symbolYesIcon, symbolModIcon, symbolNoIcon; + static QIcon choiceYesIcon, choiceNoIcon; + static QIcon menuIcon, menubackIcon; }; class ConfigLineEdit : public QLineEdit { From patchwork Fri Aug 7 09:19:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 746171392 for ; Fri, 7 Aug 2020 09:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5DEC020855 for ; Fri, 7 Aug 2020 09:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792057; bh=bRoaUZupeasNKEwMT5Le1pzOWSxogpGGuQvkFWfPhz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=B8LrQiOjRcjiyU3YgKbUFFbYgZLz9M5ek77H2qr5W91VqctFWgbUxfh8K3BkfOT0Z gK8Uslp3VI+zwCFu9V2q6kxF1zBiMTxgugcs5NZ6ufHUZ9pM8DIdqBA6fDkCgUfDgk qxzBt/M42IwcAxj++jXJocmO5vrkk5RE3qnOJaN4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728291AbgHGJUv (ORCPT ); Fri, 7 Aug 2020 05:20:51 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:42284 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbgHGJUH (ORCPT ); Fri, 7 Aug 2020 05:20:07 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQE032147; Fri, 7 Aug 2020 18:19:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQE032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791965; bh=CHGYyKC6ZwhAz/bcMeo5wBWhWaERIRrhB+YayXBw4hI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n2fdm4SUDFq97F7DLvTR/XgQoWX2yAQgDfA47hg4gkV2eDQtS9mMrNpO7BIfX0scK Zm+0/SAZ6T/076XK3sQhNZgbSula/eMAEMOOUB0BMwETFNcFWqbUw9BCalmBCOJjwH hvyTkJJZBO3gnBrRI6N1ZcuqJI5G55nHj9P+VSBeCjK+XOSn6JXFcILW0yeATV3SFb PIcpOfwzZq60WZEHDJ5B+AuqoIZLVM7hqxIjF02gmUaw+vUo5eysJe76YmOAZGL8lj weJPo6afGzmDRqcdeg3Z1ReWFEi0u5FR/mDFjatThEKXuUMj39T3oW8egTYesgdkTS KvzKfBgLSBAxQ== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 18/19] kconfig: qconf: do not limit the pop-up menu to the first row Date: Fri, 7 Aug 2020 18:19:08 +0900 Message-Id: <20200807091909.2985787-18-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org If you right-click the first row in the option tree, the pop-up menu shows up, but if you right-click the second row or below, the event is ignored due to the following check: if (e->y() <= header()->geometry().bottom()) { Perhaps, the intention was to show the pop-menu only when the tree header was right-clicked, but this handler is not called in that case. Since the origin of e->y() starts from the bottom of the header, this check is odd. Going forward, you can right-click anywhere in the tree to get the pop-up menu. Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch scripts/kconfig/qconf.cc | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 19f7764c1d68..8eacebfeb030 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -863,40 +863,40 @@ void ConfigList::focusInEvent(QFocusEvent *e) void ConfigList::contextMenuEvent(QContextMenuEvent *e) { - if (e->y() <= header()->geometry().bottom()) { - if (!headerPopup) { - QAction *action; - - headerPopup = new QMenu(this); - action = new QAction("Show Name", this); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowName(bool))); - connect(parent(), SIGNAL(showNameChanged(bool)), - action, SLOT(setOn(bool))); - action->setChecked(showName); - headerPopup->addAction(action); - action = new QAction("Show Range", this); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowRange(bool))); - connect(parent(), SIGNAL(showRangeChanged(bool)), - action, SLOT(setOn(bool))); - action->setChecked(showRange); - headerPopup->addAction(action); - action = new QAction("Show Data", this); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowData(bool))); - connect(parent(), SIGNAL(showDataChanged(bool)), - action, SLOT(setOn(bool))); - action->setChecked(showData); - headerPopup->addAction(action); - } - headerPopup->exec(e->globalPos()); - e->accept(); - } else - e->ignore(); + if (!headerPopup) { + QAction *action; + + headerPopup = new QMenu(this); + action = new QAction("Show Name", this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowName(bool))); + connect(parent(), SIGNAL(showNameChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showName); + headerPopup->addAction(action); + + action = new QAction("Show Range", this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowRange(bool))); + connect(parent(), SIGNAL(showRangeChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showRange); + headerPopup->addAction(action); + + action = new QAction("Show Data", this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowData(bool))); + connect(parent(), SIGNAL(showDataChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showData); + headerPopup->addAction(action); + } + + headerPopup->exec(e->globalPos()); + e->accept(); } ConfigView*ConfigView::viewList; From patchwork Fri Aug 7 09:19:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11705241 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5759D13B6 for ; Fri, 7 Aug 2020 09:20:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F98420855 for ; Fri, 7 Aug 2020 09:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596792052; bh=LuExjSohpBpiwirQn+MUQi2JpovhROD8nF5LsSRI8uA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=wBYcPLUhCjrZtsg46VgI4PFDraimrz6iaIIYHzVnINTxRI8kz1DxdkdhVvZLOBc/K P1fHxEW9XL5s/P+ur6ioMuIoEoJEtrjQXvG6AZcrx3khYPuqDkeSejJny0DPWomShb 4v6B2Y4WpmXs1tCGYyWUz5Jh8EWXtiZIBzVNiRhs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728268AbgHGJUv (ORCPT ); Fri, 7 Aug 2020 05:20:51 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:42276 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728228AbgHGJUI (ORCPT ); Fri, 7 Aug 2020 05:20:08 -0400 Received: from localhost.localdomain (softbank060134047170.bbtec.net [60.134.47.170]) (authenticated) by conuserg-12.nifty.com with ESMTP id 0779JBQF032147; Fri, 7 Aug 2020 18:19:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 0779JBQF032147 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596791966; bh=vg1UK8X3+Dt2794jmYGfE1ZPMS7oNKG3Ek8+eQungWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLrJq71ZCbrj4N4ifnUJFyfAHX7jl1wvjbNreybb077uwaoT2FZek9lEhLC/cNXbt l9wvyJUj8GFDriihv1Gfnu+pq+NfCXwssx2L6p+PnzqUSwGPBFSMYQYTMMw5ULASsh Qmqod5g2vOYKcp0/HBVeqkWbvzZotykhDTB6TLM4TuylLlVnoizYEr+Cusn9Pu+6Bq zxt9+BxG4Ng1SKe8x3D0tOyeU9INM7TAnoJOuiVv8GEEqWJ6H/3uifQyHflvl3Hmv2 gXPbwTr1jEuC5nxtxqW9af/eMvdRQ+aAyzM3FWodsN2syY/s0vb3B2RcMuilnfiEy+ 8jhsxUwPJJF3Q== X-Nifty-SrcIP: [60.134.47.170] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 19/19] kconfig: qconf: move setOptionMode() to ConfigList from ConfigView Date: Fri, 7 Aug 2020 18:19:09 +0900 Message-Id: <20200807091909.2985787-19-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200807091909.2985787-1-masahiroy@kernel.org> References: <20200807091909.2985787-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org ConfigView::setOptionMode() only gets access to the 'list' member. Move it to the more relevant ConfigList class. Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch scripts/kconfig/qconf.cc | 46 ++++++++++++++++++++-------------------- scripts/kconfig/qconf.h | 9 ++++---- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 8eacebfeb030..ee6da1a8c636 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -358,6 +358,18 @@ void ConfigList::reinit(void) updateListAll(); } +void ConfigList::setOptionMode(QAction *action) +{ + if (action == showNormalAction) + optMode = normalOpt; + else if (action == showAllAction) + optMode = allOpt; + else + optMode = promptOpt; + + updateListAll(); +} + void ConfigList::saveSettings(void) { if (!objectName().isEmpty()) { @@ -900,9 +912,9 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) } ConfigView*ConfigView::viewList; -QAction *ConfigView::showNormalAction; -QAction *ConfigView::showAllAction; -QAction *ConfigView::showPromptAction; +QAction *ConfigList::showNormalAction; +QAction *ConfigList::showAllAction; +QAction *ConfigList::showPromptAction; ConfigView::ConfigView(QWidget* parent, const char *name) : Parent(parent) @@ -933,18 +945,6 @@ ConfigView::~ConfigView(void) } } -void ConfigView::setOptionMode(QAction *act) -{ - if (act == showNormalAction) - list->optMode = normalOpt; - else if (act == showAllAction) - list->optMode = allOpt; - else - list->optMode = promptOpt; - - list->updateListAll(); -} - void ConfigView::setShowName(bool b) { if (list->showName != b) { @@ -1487,17 +1487,17 @@ ConfigMainWindow::ConfigMainWindow(void) QActionGroup *optGroup = new QActionGroup(this); optGroup->setExclusive(true); - connect(optGroup, SIGNAL(triggered(QAction*)), configView, + connect(optGroup, SIGNAL(triggered(QAction*)), configList, SLOT(setOptionMode(QAction *))); - connect(optGroup, SIGNAL(triggered(QAction *)), menuView, + connect(optGroup, SIGNAL(triggered(QAction *)), menuList, SLOT(setOptionMode(QAction *))); - configView->showNormalAction = new QAction("Show Normal Options", optGroup); - configView->showAllAction = new QAction("Show All Options", optGroup); - configView->showPromptAction = new QAction("Show Prompt Options", optGroup); - configView->showNormalAction->setCheckable(true); - configView->showAllAction->setCheckable(true); - configView->showPromptAction->setCheckable(true); + ConfigList::showNormalAction = new QAction("Show Normal Options", optGroup); + ConfigList::showNormalAction->setCheckable(true); + ConfigList::showAllAction = new QAction("Show All Options", optGroup); + ConfigList::showAllAction->setCheckable(true); + ConfigList::showPromptAction = new QAction("Show Prompt Options", optGroup); + ConfigList::showPromptAction->setCheckable(true); QAction *showDebugAction = new QAction("Show Debug Info", this); showDebugAction->setCheckable(true); diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 460b858b0faa..461df6419f15 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -74,6 +74,8 @@ public slots: void changeValue(ConfigItem* item); void updateSelection(void); void saveSettings(void); + void setOptionMode(QAction *action); + signals: void menuChanged(struct menu *menu); void menuSelected(struct menu *menu); @@ -105,6 +107,8 @@ public slots: QPalette disabledColorGroup; QPalette inactivedColorGroup; QMenu* headerPopup; + + static QAction *showNormalAction, *showAllAction, *showPromptAction; }; class ConfigItem : public QTreeWidgetItem { @@ -196,7 +200,6 @@ public slots: void setShowName(bool); void setShowRange(bool); void setShowData(bool); - void setOptionMode(QAction *); signals: void showNameChanged(bool); void showRangeChanged(bool); @@ -207,10 +210,6 @@ public slots: static ConfigView* viewList; ConfigView* nextView; - - static QAction *showNormalAction; - static QAction *showAllAction; - static QAction *showPromptAction; }; class ConfigInfoView : public QTextBrowser {