From patchwork Sun Aug 2 16:17: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: 11696555 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 A09726C1 for ; Sun, 2 Aug 2020 16:17:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C44A206F6 for ; Sun, 2 Aug 2020 16:17:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385061; bh=7w+Bb8wDvVrOyA3cttHY7n9+OnJymn2rQTqsXKxnIok=; h=From:To:Cc:Subject:Date:List-ID:From; b=qyW9buJcJGTTh01eSF51kMemqKsGx3IQ8mW+MJgnVKuocNAsQaWI1InmNnjksp17d EkxyU1XchqdXDQVOJ+blL28iU0UbfRVyRGgfj9o+wpcVuW5XDsAhy5z4rpILOMx4+5 4Xg+6Z2y5UrTAkQhoz3Ki5mmap43/FUJ3j02lWnM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726370AbgHBQRk (ORCPT ); Sun, 2 Aug 2020 12:17:40 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48423 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725907AbgHBQRk (ORCPT ); Sun, 2 Aug 2020 12:17:40 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOac003720; Mon, 3 Aug 2020 01:17:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOac003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385044; bh=Ms1SMsEQKmMZBTX6ILMMZvwlhQrJfGkj/nzYKWYupUU=; h=From:To:Cc:Subject:Date:From; b=cz0pM2jYAUHhklEwWU1tDkhSOB9zD9qYha53HYhPqOUnaOI6CjqCcQYOLWqCloRcR sYay2GaNHL6m1L29pHHrXW/HqCOiXrooEFjQbyI4woXDgiCBQYa/99VMDLYNUCxQWH Og1Eol4BGdL0QYayG7l8gHZhPwEkj1iRX/WI+d4tex7iwACkcM+D0m9vjdW7em8cQP azbyrAvtmLXnTozoQJWVPLcxEa7Gcnl19CBmkYCXJMNIPlulkV7wZyaZGWzVWPU8zP utoibfro10iJpjn7+zxU3eNjfDeFJyW7v99WXO9tdXJu6vCT2ZIiK9wAnBIwAb1Qtr V9JBkrpUnI/xQ== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 01/16] kconfig: qconf: rename 'config' to 'fileMenu' Date: Mon, 3 Aug 2020 01:17:06 +0900 Message-Id: <20200802161721.921721-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 Rename for clarification and consistency. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 23d1cb01a41a..9513c0ba8d0c 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1517,13 +1517,13 @@ ConfigMainWindow::ConfigMainWindow(void) toolBar->addAction(splitViewAction); toolBar->addAction(fullViewAction); - // create config menu - QMenu* config = menu->addMenu("&File"); - config->addAction(loadAction); - config->addAction(saveAction); - config->addAction(saveAsAction); - config->addSeparator(); - config->addAction(quitAction); + // create file menu + QMenu *fileMenu = menu->addMenu("&File"); + fileMenu->addAction(loadAction); + fileMenu->addAction(saveAction); + fileMenu->addAction(saveAsAction); + fileMenu->addSeparator(); + fileMenu->addAction(quitAction); // create edit menu QMenu* editMenu = menu->addMenu("&Edit"); From patchwork Sun Aug 2 16:17: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: 11696557 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 F08216C1 for ; Sun, 2 Aug 2020 16:17:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9541206F6 for ; Sun, 2 Aug 2020 16:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385063; bh=UklBIa1svaZEUGZY6ukHtxMHq0RAcb8mI8dcMphJZgM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vYyuC3mscnhPSZNBl22Us6oJDZFAHJmTYUub8aKVDHy0WWOyI3pScII4eyN0hAt5j H6BDNdL3TeTWatRb6Mf1RGEEJXu1zEjI8ICul6iGKqWwVvKNWnZXBMnXtrSClK7lJ+ xMFyyM7sUOWp99VePcmqJazCkz/W8TnDlB+DbRy0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbgHBQRl (ORCPT ); Sun, 2 Aug 2020 12:17:41 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48422 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbgHBQRk (ORCPT ); Sun, 2 Aug 2020 12:17:40 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOad003720; Mon, 3 Aug 2020 01:17:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOad003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385045; bh=OsE1s3BNvGrY4g69Jb5MF5p6Ruan+BT3dER0FGv6bKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tmKgKl1tM944R69Gjgh9ykQGxrfKg/G+QxldFfGHOMjg7+CfZTjHYOG2rsBiZxyE4 LRxfELJsdg9Swu4HjbZlCWanUTTtk9bsYWKk3LB3620jrTn8WFdnXrMxadBjlHshAC puk+KdkXGUJpYtTm3FPuhSK0I1jjocDG3tpotRDESLJAblnT4FUNH71VYEgT1r0dRN mbqHwIlz8olz3EsCzOsVThkeg6M6vQrK/rVf9j7gZOj689LzWLYkUvWeTuAFFSB8pp ZbOZvvGMjTm0y3kNYkrXOk31wRImNb/JfZbsZSYGlMCyM+WbgT2Jd5Csbpu8UtCTeI pc+TV3GHrAUOQ== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 02/16] kconfig: qconf: remove 'menu' variable Date: Mon, 3 Aug 2020 01:17:07 +0900 Message-Id: <20200802161721.921721-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 because it looks like a QMenu pointer. You do not need to use a local variable here. Use QMenuBar() directly. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 9513c0ba8d0c..0ef9a1da6475 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 file menu - QMenu *fileMenu = menu->addMenu("&File"); + QMenu *fileMenu = menuBar()->addMenu("&File"); fileMenu->addAction(loadAction); fileMenu->addAction(saveAction); fileMenu->addAction(saveAsAction); @@ -1526,12 +1524,13 @@ ConfigMainWindow::ConfigMainWindow(void) fileMenu->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,8 +1539,8 @@ ConfigMainWindow::ConfigMainWindow(void) optionMenu->addAction(showDebugAction); // create help menu - menu->addSeparator(); - QMenu* helpMenu = menu->addMenu("&Help"); + menuBar()->addSeparator(); + QMenu *helpMenu = menuBar()->addMenu("&Help"); helpMenu->addAction(showIntroAction); helpMenu->addAction(showAboutAction); From patchwork Sun Aug 2 16:17: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: 11696565 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 7105A1731 for ; Sun, 2 Aug 2020 16:18:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5987320829 for ; Sun, 2 Aug 2020 16:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385088; bh=1UtANFu/BmJylUjVYFVC/NjDZsYvtBkcmG1Bw3m32As=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Ua9JpWBosv5fFP4IaKCz4LOkVgjQfvI8BrKb7HE3ny3cjCr80Igz3HCHykDLXtsjx DagEf8UH8pW1A+xa8N1ofFoTpz0PNNyjzFrIXgn0uzhSH5nKf0JJ7GBNNsQljbLtoc A8iLyjRh8B1DJe15f+9c0E7u5ci2lXlr2TGdPFG8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbgHBQSH (ORCPT ); Sun, 2 Aug 2020 12:18:07 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48907 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOae003720; Mon, 3 Aug 2020 01:17:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOae003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385046; bh=hqiIXIqdCOcES7qgpPpJ8J0MEsEi3bePazNZOEv2i18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GJ4yFE95su/9EDUh+wbvFz2rn9zl8n3Wpb18zB5RlCgpWcaie0DDVGU/UI7s6elCM fC4jNWc5zFcJhfYuipxAY/aSUU8VnSW7ix2duAJ5evacq3rCqRDNpE/++DDeEIn7lu sehDfAvQvknhHhjmUabLqDQqBXDjtMmNyGCUJ2J43V05eCPenkws4FYtobragnIHg7 1TOcEE9Eol/t+wGaJLVidXTW/FRQt9FH7h7pr2+TNgWVBKLlhdKq1X8SANqFZTUdi8 ilnnaGv93dA1axblFcB+r/AUq7LFdcn6voyvhS9on+C+xphlB1OTbtGKKBzcHuy66s QStzxb0jk86/w== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 03/16] kconfig: qconf: remove toolBar from ConfigMainWindow members Date: Mon, 3 Aug 2020 01:17:08 +0900 Message-Id: <20200802161721.921721-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 0ef9a1da6475..4eb846c90b1d 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 Sun Aug 2 16:17: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: 11696561 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 011836C1 for ; Sun, 2 Aug 2020 16:18:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D44C220829 for ; Sun, 2 Aug 2020 16:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385087; bh=9O9+zlsC5DQlBSrtgpc2tpNJowoEcgCX7BwkJ/NV7bE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=C235ughQVh1kCKcmyMK0Z6FHZDTawXD3qcaoro31l+vCS0X43TYW97f1AqXZn59PY 527TwvERhTpLrFJLiuIs80hXCu+SQ1nUJIEQgIHLkLk8bDtUfKn5pMFulqpbl5jWK/ tiFEkjAl87Y1Z4QPx9DEcB/8rm1oeTW74NHnX9w0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726990AbgHBQSH (ORCPT ); Sun, 2 Aug 2020 12:18:07 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48899 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOaf003720; Mon, 3 Aug 2020 01:17:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOaf003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385046; bh=D8cZPxfdH13g2h9tnQXi8Kk8vvwyegez8SFX7ls7ooI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uhDKkX+Qe22HvK1zSfyc5sXaDAxitXSDo6rMErpg8nuNbeuXpz0xdZcxeW7xClOg0 e+tSF+RXmTIL01Omyy718zOM8pqMEVPzJJPUAULoxPmCp4OJww/SvsqD+ALkS8Mxiy 8G1xXZKYdMI/iYbR/u+yMIGAA5d6EOvBoqdhqpG53zLjdkILYmt3C2sqG7EP0AVrcM SNz5/2yOREcEhZRyzw7p3PL/aHFXSHTiXwpsyhs3toJ/VZYDToqXZWdXAo2E4bDGu8 P92ZPtytH8HGpjP1W9Jh6OlFjqsPeCRFM/IoRLVU2C2Gy/Q/KkUR/qohzAKhyw1Swr skc40P15Y1pPg== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 04/16] kconfig: qconf: overload addToolBar() to create and insert toolbar Date: Mon, 3 Aug 2020 01:17:09 +0900 Message-Id: <20200802161721.921721-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 4eb846c90b1d..e17c46bb75e8 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 Sun Aug 2 16:17:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696587 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 456586C1 for ; Sun, 2 Aug 2020 16:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2AB0922B3F for ; Sun, 2 Aug 2020 16:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385132; bh=NH6wp9sy9LymNQIHzQnIUIHpd3Gx5UrH0K5K9t+ghzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0rZNPLveQNCj/kEwVKjicYG1HzpEDVNJlRriq7bLAJbEejJXtsjQcaXkKpEXj4/7L JDmo5k7iiPigTRt8PyrPos/Lv6+W4YlRp1cnxCFsROuLp+Zz7TS0CZy1Tb7p7yZWJO 9awyjLcwoL0emDFgGB8XNuLVuIyVngUihAb+kKrk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727813AbgHBQSv (ORCPT ); Sun, 2 Aug 2020 12:18:51 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48898 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOag003720; Mon, 3 Aug 2020 01:17:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOag003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385047; bh=VYR6SHz+m2VPEa2TZmAxDgYUIVGzNeKSGROTaBC77oM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIKNAeUx6AC+rMG+irVlMJS7DPgAe/3Te94a0r8KI6wTWIpYvt+As81yVnrfwoNj7 bcvMKdODzAdqRRQINQkxpKxopwX2NUnTXP0tpDXgP9ckeq1oqAaF5dBeotzPH4buNu YrOB7fstV5tVmexegy7R14nk7otmdfC0BbpwM3MhXCENpwZc93cDS1bkKo4iTQuqem kXTbbZ4d/Eo9qM5fk251/Iyr5s5WB2JmXkajUrgTpyiAGOc2EDa6ok9bKCnUv/8ubp 9Mjni48e55smVaSx9nQwjkL/oQa5mBnBsJWlpqRw7OT4mpeXQ5zcFSdOTfT+dgnOPP h9jLUHrFgP66Q== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 05/16] kconfig: qconf: remove unused ConfigList::listView() Date: Mon, 3 Aug 2020 01:17:10 +0900 Message-Id: <20200802161721.921721-5-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 Sun Aug 2 16:17:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696581 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 8B191913 for ; Sun, 2 Aug 2020 16:18:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6935C207BB for ; Sun, 2 Aug 2020 16:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385130; bh=hocPG4Fjj8rGQzSIjfz8ZD386k+kX1y/zl0hAKQ/TNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eSOqoKKVIN9F1yI2QeDCZhlQZulq4lZfENrYYAZoBdEBgMLoPKtwc/goYVEWEQDaj bWKF5Sdr2eqZ9blsY0hiOuy2QL6SSVYkAK179BI9CGc8gk8s6bujReHNm7XbGUa+Qr N4wOQ7Rw12Ec0je1KANxN0Z0n39yQsM6Xr+EmY/M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbgHBQSd (ORCPT ); Sun, 2 Aug 2020 12:18:33 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48903 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726956AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOah003720; Mon, 3 Aug 2020 01:17:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOah003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385047; bh=dIQiuFuXJX/6WFvX4m7dkBVvzX0JYCw0Yn5678SsA1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jsYb6WG3NhEt4vsCAoE6JVuyo78CL9PS+BIvDRQM+vLgYbgzldVV0SZd29yzfiHiv 8tamTLm1UukR+wrEsxyNnNG1GvDDgZ/EYaVcq1yUWTFP5lcpub5zPwrxnK/K2bJ7vL q2E/104dfNbpRR5ftq0XzDQZJNpyqnuR+2Cn0NFRqDAT9RUhZooAbKDHpctpMOtmHt 0nY4AaWuF9GZr/8j7CC/oQmuwlmxL7HHjkA3JxIMGAW6ne93OY0aa3UXraX13WgXSL yfQGf60LL3QyHjljDJqNkCYg1uEDVYhb2QmzX4NiJiNVZwLCoxHDXYVbcE98eAjgCx CkTLtPsnSg9yA== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 06/16] kconfig: qconf: remove name from ConfigSearchWindow constructor Date: Mon, 3 Aug 2020 01:17:11 +0900 Message-Id: <20200802161721.921721-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 e17c46bb75e8..a74bfc65b633 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) @@ -1643,7 +1641,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 Sun Aug 2 16:17:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696563 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 29BA8138A for ; Sun, 2 Aug 2020 16:18:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07CEB207BB for ; Sun, 2 Aug 2020 16:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385088; bh=YqJkF5bJ9bIiE8Lx6T/NYqE9TbLaSeAdTqaED6T3mUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FYM156/CDr50tkevdzjmnNaZizMQSN4boKd5rzuxuHWA7bsZg0B1MJYnTYfVwiJL3 qjHdu/tMwx4TNjjpHYHHp1+l3q0CuEK7UmUwyaIdW1AxSQwClHjmb4TRUmMNnXVclL KubCqvDZj4UHQr5kLoRutrYb3Kge7fvrpBphlch4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbgHBQSH (ORCPT ); Sun, 2 Aug 2020 12:18:07 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48900 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726963AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOai003720; Mon, 3 Aug 2020 01:17:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOai003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385048; bh=de8yjMPnXxE5FpGJ8JaPEl9WrzMvvXqUqs2K+MZKH1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1c+/2Hej244di0Vsvb41LYaC31R+CCo8JeEinT99YWv/7K5PQXignaDC70rw98dI0 sJbgLtn7pzKHqrDIb48AOZDjvqcEfrSbhVoxNQLlID5boJJz80cXzCeP3JbsWQkZF2 sATLb9Mg01CL5FoiyguApYKo1M2qvKIGuiAVq+qAXJuV6PnIfigUDXI/Gd5Yx2zIHS 4x6NL6BMeZEB3nxntCBNC+6IiqwTHR3KdZSSAt0BpuDasIqbVBG6+2WS4uOqlUC3Aq x1VlUwcEsp3lLlrWyWl0BesKCsd13QPjO6D7ASRR+i2qLPAs++Y/S4z59e1D0kCxIb dRY7VdW6RSndQ== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 07/16] kconfig: qconf: omit parent to QHBoxLayout() Date: Mon, 3 Aug 2020 01:17:12 +0900 Message-Id: <20200802161721.921721-7-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 a74bfc65b633..81d55e75cf71 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 Sun Aug 2 16:17:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696575 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 A1890913 for ; Sun, 2 Aug 2020 16:18:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89D5120829 for ; Sun, 2 Aug 2020 16:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385115; bh=8CP467njzFcgw1TGSpA5nswBzbqiPPWk079ixyaizAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ju97cIjdL3p8XP6eeJha+XAUxX0GbaWk+16CkGgnY+KWM8OubYHGMQ5YqT9evFQES qLDDQpZGD5o5rojV2nTjDO18eV0/cYx9ryVmRNDJQBF3LslqFTGMcINbs4lDhehtyB R0F/GRwlVcLAZHJQCZp2yo71DQMp6wlNW4PKfKCg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbgHBQSe (ORCPT ); Sun, 2 Aug 2020 12:18:34 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48897 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOaj003720; Mon, 3 Aug 2020 01:17:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOaj003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385048; bh=JUASlDdYi9Wry5HM8MJA4Tibcs9HL5OwbAaKk04di+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hAog5cgPDYhj605TPdzfy4AsA3biykyR3Et873GvJdYC4evWxEaoHppQvIrkGSLo3 OUJWP/KNTNf7Ujo6SqjoVLwDxfPmipcDmObrvoh+KxacTJrhL6x8LvnAJYX67empJW pNvyrJOQEYAuKCfomE3/mhWzlgKQRTo10EltKQD4ktZbVIuHBBXKYVNPCO97p1GZxv S/VAh/8CPR4cS0AB0DaTHPoRAaECgQQoNPaEHb5DimaKXjpfzCAoenWdjFqJorwSgr WNsOxkX0/CzGLJ0ISvI3ntzapzPDWtqCM3bFYaMYx1x6YXr5Z6gcq4jJXUsAIrfykB Dz0ZGCe8HuT8Q== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 08/16] kconfig: qconf: remove unused argument from ConfigList::updateList() Date: Mon, 3 Aug 2020 01:17:13 +0900 Message-Id: <20200802161721.921721-8-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 81d55e75cf71..e65a323754fd 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 Sun Aug 2 16:17:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696573 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 33B64913 for ; Sun, 2 Aug 2020 16:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1983E22B40 for ; Sun, 2 Aug 2020 16:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385113; bh=Y0en/AZJopbLmCxXIaQn+P+q9X2/9AUn6KzYYURXPRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OqjO/xc2SF904ZxGuOv2kwVnbSUw6gRfpI8xbLH8fclyUzUouXqV91aPxsJixRB1N vvowsw4lLUNqB5iZQ48a2rjKJW3VfLMjfPA0fPCySzUWuvSI37MI5C8fGRX5bOQoJz TyfdBUTDTuInkh3S1U75AFgYSNuP/Vv7Pa2n//i8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbgHBQSY (ORCPT ); Sun, 2 Aug 2020 12:18:24 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48910 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOak003720; Mon, 3 Aug 2020 01:17:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOak003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385048; bh=F/o54aoJCSOXONzWWk/Ap8g8IDQiwDgOohQ0NDziXL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DS/Law3jOVA5nQ/7z478BAtiPjYSw5Ac220b6cNHjeQZaV5U/3AatEC9ZunW0FD3P Vt5McF/7oDvbdP/DLaiWwuEhyHtKfK2ZiOiWTdbCkhSST1PjjbcytH5Rl0R5twlUJW sGzeDH+z39WS3X1hQd5J1z2vEo3cfkdD93g7chYBcgflL9DfVIXJiOYx6vuOd0gcVF LCbEIsPVGIMTt6kj4aXK1YCA1UlrunUFjTpS7Sgvtmz1dQN+Nt0Sh6KEN+rMxznteq L/fMlaBlAOXQk4VgEkvRlPR8a8/XTzusTNJFoDcU32L3v5X9mtUf3XZly7ZNzP/5Km GyZ6Lbfm/J8EQ== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 09/16] kconfig: qconf: remove unused argument from ConfigView::updateList() Date: Mon, 3 Aug 2020 01:17:14 +0900 Message-Id: <20200802161721.921721-9-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 e65a323754fd..f492e8810f89 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 Sun Aug 2 16:17:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696579 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 DF2F7138A for ; Sun, 2 Aug 2020 16:18:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6751206F6 for ; Sun, 2 Aug 2020 16:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385129; bh=oSoiLgLkhT7/7ytL42pA7OfrN+xEwzR+5SA+u+KCI0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=xNR2DKA5L0smki3ulo1FQpDPIORLPmogm3NJOJqoJwdba6ENe/0L0fxQAniRIhk6T i3MvrJI1cFYLAJ02vliP48hiM8YdlW0MGtgZiCThca6KOaNRWU1MO2fKdpqMHrZ2t0 iCzQ7H0UkSPzP+QZodEgFLcoJPS7OA5S/9oKftHk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727112AbgHBQSe (ORCPT ); Sun, 2 Aug 2020 12:18:34 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48905 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOal003720; Mon, 3 Aug 2020 01:17:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOal003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385049; bh=qPig2vflg/7ZPARWjjn8bjUvyZZG6lOHLx5Ds8QNDF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dt5KpR2Hmfslmk/Y0EYV5HeJSJTHofvwodcGZCEFSk9DShmFyPpeLxwbLA0vTDmWg 7KVSXCQsDugEZaqS2K5w2nHv+IyplDy7sYAj8Qo1065QLVR9r6x4jF9guxS8Z6IvYR X7yj1coShLhnO6c8klRV2L7n+0TcMrjxGfN4G+bdfyOvkXlh2aClpdql9z4rKH7vXV MZIvtS40FldagXQDjQgZ05bS7p1vjMieJNyPjdXKH4faI885/6JGG/0g8OomvksPPJ VNMA4P8c9nIBnSWWgUbkQIDaC1lA089n2ZkQDMiu7wmq7X7MQ9glDnfVs1L48a8cpU gIfpViYlLIp8A== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 10/16] kconfig: qconf: remove 'parent' from ConfigList::updateMenuList() Date: Mon, 3 Aug 2020 01:17:15 +0900 Message-Id: <20200802161721.921721-10-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 callers of this function passes 'this' to the first argument. So, 'parent' is always 'this'. Signed-off-by: Masahiro Yamada --- 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 f492e8810f89..7f7164c71163 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 Sun Aug 2 16:17:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696569 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 623FE6C1 for ; Sun, 2 Aug 2020 16:18:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A9E520885 for ; Sun, 2 Aug 2020 16:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385104; bh=nOa8wxJm1f8cjqGfL7NjNeo+Mx8Us8DVTtmrq2udKrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dmVdt9xnngLecsObvqVf7RmZRQXp4Q8OeAVDHAfuBIkcO0EXbqqP3hOnitOLpXp+x u07pVsdLAzLGyVongODBIXYEoNbcz6wQS5gSEqygF34Rja0MNR7s7ff/xbZ70oaHRn QZfOL5EC4R3NK4VMbfb6tZrk6eHy6lplb8FVNohA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbgHBQSX (ORCPT ); Sun, 2 Aug 2020 12:18:23 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48904 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726965AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOam003720; Mon, 3 Aug 2020 01:17:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOam003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385049; bh=rxIR7xmDbgwILNsGth0BdqXszWzbdWYmbGkGpyVmV1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tdBzI/TyyJdQ5b5Bfxv1PJHmHdhlSUaFQAJKZA/gBQWZLSMjmcPSTK+MyoKtuPOxS E350UMAndXjLrZakLXXJ/tk0YJ3iW+yAgdwUgCa/jRJqxNXkJ8hcaKZUbLY1gVwP/K qzIsFPeg9TCpLrL8uKvf2/xw80zcQxCMob5otvkYdpG66yrEtV14vDjw2QSE1qMPfW Q6+umNouC5SV1EK06onCGRfEb2VKHC7b6/WtEw/1lG+ho7NTsNvcX2ztg0PzHuZRMv E1zzulub4MYBKSvBW3o188EUmLiO+Ppe5bJBIre6/ctvnFM7bOWvCXx8PHOY1j8gCg 2ELS1FVxtYzLA== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 11/16] kconfig: qconf: drop more localization code Date: Mon, 3 Aug 2020 01:17:16 +0900 Message-Id: <20200802161721.921721-11-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 7f7164c71163..de46a2fc3f98 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 Sun Aug 2 16:17:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696583 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 A77D1138A for ; Sun, 2 Aug 2020 16:18:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 907BE22B3F for ; Sun, 2 Aug 2020 16:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385130; bh=wHTOrJnmmvaQ39KiSciZ+BzsInDpBJ9IEewHVShrfq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fjc5+6I4HwyDQqbGtWijNsS3Ls72SLGzeIcInYxiiPFAs27MEU9b/MlOCtNROw/Lr efyfJlgISSFhGArbb5hiiaN7908s75WWipJQxQH54LInnDoU6gsqVz6t91vRFY2LFa pZG0M+Za45fWQRgnu/Y4U807bcs7IsGINr3TYGRc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727100AbgHBQSd (ORCPT ); Sun, 2 Aug 2020 12:18:33 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48909 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOan003720; Mon, 3 Aug 2020 01:17:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOan003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385051; bh=1QwsYPX/TRZCCEnjbvN03XB9oaYZ36pUlFuofsrgnTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WupozzFfskp/G//KCA4Rb+9BC2a8z28/W9jGmyZ4oW8GZLNs/pTndSguwyyEJHpHA QEXsoZ9XohiW6bzBJx5PAjKlPBz2gBGrt6r2iIZkwPI0kGloQNdXOVWfmBQHSYRuHp M9AJB1RtzMrB5vGFhE9UEeL7nPwbxEDMjACi4eZME5e/f5XoJxS9oIhY0M7Q3wXB6c 96Jl+a66930LeP1BIld2ezFst4EDUXOL26D6Cio/WBMKMDrQTzk5/5pRjWNmzvtYdC d3gemRwz1kEQO779y6esFmBve2WXa5zaE8fcgQiiVZtxtwId/n1Z9OV/qCof3dyBj6 umML8E8O+pZ5Q== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 12/16] kconfig: qconf: remove ConfigItem::pixmap/setPixmap Date: Mon, 3 Aug 2020 01:17:17 +0900 Message-Id: <20200802161721.921721-12-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 de46a2fc3f98..94ffb64d3eca 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 Sun Aug 2 16:17:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696571 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 89B67138A for ; Sun, 2 Aug 2020 16:18:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68FA522B40 for ; Sun, 2 Aug 2020 16:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385104; bh=uduH/2NAifIDrvbdCQ9vNRzXuEtPGIsHVvhkDbPtI00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=J1GJ/6d1eaKl5fwuUmX8R0e1HyLk2aMnvh+CmCsZGwHRkdcqm7T7aab789yzwn8db LmBWoFR4IiJDcJ2rFW6Qwc1l6aXW9/hs3utZ5PaHdmKMFzwPvWhb5iOXfu2Hmjf0+s Qv0cJ1ig33ei9MZisit4zEl16eOdJ1KrrRREfT7s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbgHBQSY (ORCPT ); Sun, 2 Aug 2020 12:18:24 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48914 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726975AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOao003720; Mon, 3 Aug 2020 01:17:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOao003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385051; bh=Ap0/SOrgdWrc0cVJydhT7UgXLUOg9wnxtYtpXHl1wxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ErjTkBoCwmdQBnWeoRACFUI24TEztcZBpB+2fzVuWRdLFRKI4tYBpC+njeHV8dwJd CxKado7L0HUYttuTxialguev6O9VOHKNyVQEMW0seDSZcKKflfuulNTCWQKUgNv6Pq e5M20pvuz6+SJ/aluZlYsbWHd7Hum97jc+0jMcfgBSHWV9kfVKVG1m10FFWZCfITaX mddplkpf5grOSpdkKyaeudDgzVDFlWvE28bseESupfLsMwVSBXidEFou46Or3+mLI4 gtoa6MlAavZ4L1aBdQOWNGo7u7WSEr+7HiBszXF3pVU7OL/gih5geT4RsiOcDh9G3q OvhL3lRdc3/qQ== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 13/16] kconfig: qconf: remove ConfigList::addColumn/removeColumn Date: Mon, 3 Aug 2020 01:17:18 +0900 Message-Id: <20200802161721.921721-13-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 94ffb64d3eca..a73665d9ca78 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 Sun Aug 2 16:17:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696585 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 5E31C6C1 for ; Sun, 2 Aug 2020 16:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43B2D207BB for ; Sun, 2 Aug 2020 16:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385131; bh=aboaBR6RRTYYaNz5bJVZ9Tl9ih7f0bSEdb23IP62Cik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=13rM91wqkXivCUk+tvHp2d4CN/OiT/o9Y1rjh6WYKH/POw1TxZDV85Te7nI86D1/u ip6XaYi9PnEzq03fhqK8V/rJR3EElJMhYIyrpEPYGYwHRyT5GxwmM5mhrptUEWojNq QoBSQclgQB5FWzcfksukJV8OUcEJpBPoLU2m01Y4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726971AbgHBQSu (ORCPT ); Sun, 2 Aug 2020 12:18:50 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48901 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOap003720; Mon, 3 Aug 2020 01:17:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOap003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385052; bh=V5J5sm6nLIl/m9xpCzrGnEere1jzBD0dqwZAtD550+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rq7aBXp3ly9FQFch8StWv+KZDAlnPaTp/hOC8JZC8zc6ZpQ6CkjNIu6KpvO5Nye7Q mQLhL5/yvtLyF+Xja7T81hXUmYPGIDosEC3U+8fY+Aku8odTpdn1cqOgrwPProvpcw mrVDVhMJW+qFquvO0QmVsCAH1C2phUSx23Nn0L/kYTVWAELMVNMfuWqXuXmaxqDtfD sI7zr8ziXb5t1f/cYJy1PIula6ZzIkqzvwibhRLVNMtCRcXx4m9zjPrcDNn8G7xJu5 hAKfYlxJxDCbS6ro65yzXl0A+9VbI/p3xPH7TQLa3RGJUozPphFum65RmYzGmoyp4t NHc+8+XyWFfeg== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 14/16] kconfig: qconf: remove ConfigItem::text/setText Date: Mon, 3 Aug 2020 01:17:19 +0900 Message-Id: <20200802161721.921721-14-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 Sun Aug 2 16:17:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696577 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 C06A66C1 for ; Sun, 2 Aug 2020 16:18:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A765C206F6 for ; Sun, 2 Aug 2020 16:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385129; bh=RTCe6IeA67y79Bg5j2LyAnYXfC3BZdBTSzGijq1fSJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fwCKyu+SWU0S9yO5x7z/Ap82FZXxMFMa3e6LnpnpFpsbJlFH/BFsQ6Xd3AQzuBRa9 y1Gcghl9b2L7ngeRf3igV+tJEc3dcj4BMnI6s1BbOSSCQrjd9TcASeeXlCmRMEvOxm HP6a7OFgUA7lMQ1CT1Jw7VHdvN2P90DYwrWfgG+w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbgHBQSe (ORCPT ); Sun, 2 Aug 2020 12:18:34 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48911 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOaq003720; Mon, 3 Aug 2020 01:17:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOaq003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385052; bh=ZR2FWOJCoBwcQ4UI0mBLm+oIcogMAJji5OgIw/+72aM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R3k56eW1kn70rjiilKrjvdzBL4dlQng9/U/UNm3rseHU8r+E2jJOOCXPo6wmPFQAq +2asqdD18pV0XSYVy9lA7EbJTROj8GQEhynufZ4/JXmY1g7zNEwo28WII4CX3WMQCB Yy6tu0QTs3iVS/cL9pXhiXPz+Y7AZwcJbFU96xbRlJNJuS0+za0jKJJKSpemWCEQOX f2s6snyPqgMtEMypQCJm73I0nb1Ib6xql0vxgKSTHHBroTgHPMwZEY5kCiDfl8tczH hg+9T1Yp5AIHY8a5THNaljNAzh7vg6D7JFv+kMFYxXpMTT2u3wZjfvXFFlNEGd2mgt IZBp/Fi6ZXkjw== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 15/16] kconfig: qconf: remove unused voidPix, menuInvPix Date: Mon, 3 Aug 2020 01:17:20 +0900 Message-Id: <20200802161721.921721-15-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 a73665d9ca78..00b2f56186c2 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 Sun Aug 2 16:17:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11696559 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 972C1913 for ; Sun, 2 Aug 2020 16:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B76520829 for ; Sun, 2 Aug 2020 16:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596385086; bh=+y124x4f8ey9dG8v7cB/kI9ck2gS1m8dsf4TEz2g4PE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FKVgy/vo4KOq0xRSKWwwapLrVAzXGQjnGOHH80XmQAY993Ptb1Y4lz4YDTCiWBg7p s5RmdgvOmjVE2rY88gVCak5vRvnHKgbLvNfog/Uk+wieueREh6MS8kIUCN8yagpRS8 5rYtXTArfu1sDJPCrai4FQ45huvWqVklYahRxEZg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725840AbgHBQSG (ORCPT ); Sun, 2 Aug 2020 12:18:06 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:48902 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbgHBQSF (ORCPT ); Sun, 2 Aug 2020 12:18:05 -0400 Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 072GHOar003720; Mon, 3 Aug 2020 01:17:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 072GHOar003720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596385052; bh=Fx4RBBuLEX1RyuzYReHJPlRR6nF9JYaZi1x4BFu3SOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hNYqxS8PG7FKFhnRI/Kw8GHEMux3F6osUkMwyc3WJzFHARMFLeLlH8wD1IHvm52wE qBIeQq1+mwdg21nNmkNotBrcWeoNr5Y6yu6GNSJXjptDvoFWOzOGEsf0GbODvaCefg CKlYdHYdMTjDEGM6lh+C8gOG4eHjEGBngR3vrpKwboZNHNcdGuNy9A8rop+QwFa93F EOaqTCE4QPffT5g1WrGvVgTn9CIg4JYGheYE9goEaLIr3O4S5kvsZcSKAIIr7hA2Sr KkB1RS9qi678jLMDP3Rqorr/uOnV9gYTe6zfwXnIXcPLMX8OQhA6y+08I1wKZQVEK9 a4UlDx0TDUZjQ== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 16/16] kconfig: qconf: refactor icon setups Date: Mon, 3 Aug 2020 01:17:21 +0900 Message-Id: <20200802161721.921721-16-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200802161721.921721-1-masahiroy@kernel.org> References: <20200802161721.921721-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 --- 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 00b2f56186c2..1944abe8f028 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::menubackIcon = QIcon(QPixmap(xpm_menuback)); + ConfigItem::menuIcon = QIcon(QPixmap(xpm_menu)); + 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 {