From patchwork Tue Oct 8 18:00:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13826773 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB36D1E0086; Tue, 8 Oct 2024 18:02:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728410526; cv=none; b=N4IT2kemkCxTEC832zX6dlHwatvSlyUGBTKxech8hTs2En0B15XuB6yiLCmgpEyRzxjLUiVd+TkfUGE3iJWVwumdr6Um1Sg2C9JBOZ4Kd+zNiauQUWpFPcgPm4tqjlrP+smWf0M5Uwte3RFmBTgehhTLPjUAbQ4dtGFOEL/FzdQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728410526; c=relaxed/simple; bh=bZm3h8/hH1BGka1NtA4C1l5QJdxDis3k8TsO7flifJo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RCVkK8PK7z/yBRG4YMSFDfo0A9b7gQlek6pXN/Gvel54qRJknJG9r7kcm4zTpeUUIdHY2K/os0aF4aeegHNdh0R+/Q9ahrM8Zb4rDMdQ/tBiUzirpJ8qU98Z0Nu2k9vNS8N8sB1/5WhyF12yGtpQLwlaiQZOau48/x47Fi6YWwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FLxOv4Uy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FLxOv4Uy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 756AAC4CEC7; Tue, 8 Oct 2024 18:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728410526; bh=bZm3h8/hH1BGka1NtA4C1l5QJdxDis3k8TsO7flifJo=; h=From:To:Cc:Subject:Date:From; b=FLxOv4UywXu8Mo22aWFfhhEWKBJO0xQV6JipiDYpRgDZfNTH+QGZTzFokxH+ehGmx h8BIJw9+km8sWQuofV2msH/dG9EzPeFcL/XYN3XefayGSa3lV3Yojxu2mbKiObf9L0 dFOkAA2J5b1UtPZXcrbN1r3jQbPBOOl7THLXffhTPoQw+WbVGQFmOlMnrLyXjl7/xt BkZIeKPHQfA98X7QoYPEHVTSckBzjU232L4+osmxqnteo+CSQ7Z9u/yhAa2Sm2vRxv yGx29ZeUFtcsfaTpHFFR5qJmvwIs0P7VUxRqJVq/JzWBx7b/grNqQPzK0WozDCyhCP YTX31FTy6EZUg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] kconfig: qconf: set QSplitter orientation in the constructor Date: Wed, 9 Oct 2024 03:00:06 +0900 Message-ID: <20241008180202.2315986-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The orientation of the QSplitter can be specified directly in its constructor. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index e260cab1c2af..202823aad393 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1240,8 +1240,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent) layout2->addWidget(searchButton); layout1->addLayout(layout2); - split = new QSplitter(this); - split->setOrientation(Qt::Vertical); + split = new QSplitter(Qt::Vertical, this); list = new ConfigList(split, "search"); list->mode = listMode; info = new ConfigInfoView(split, "search"); @@ -1344,15 +1343,13 @@ ConfigMainWindow::ConfigMainWindow(void) QVBoxLayout *layout = new QVBoxLayout(widget); setCentralWidget(widget); - split1 = new QSplitter(widget); - split1->setOrientation(Qt::Horizontal); + split1 = new QSplitter(Qt::Horizontal, widget); split1->setChildrenCollapsible(false); menuList = new ConfigList(widget, "menu"); - split2 = new QSplitter(widget); + split2 = new QSplitter(Qt::Vertical, widget); split2->setChildrenCollapsible(false); - split2->setOrientation(Qt::Vertical); // create config tree configList = new ConfigList(widget, "config"); From patchwork Tue Oct 8 18:00:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13826774 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F10E21263D; Tue, 8 Oct 2024 18:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728410528; cv=none; b=GvttdLbGnw67X/eATGpRFdAj+LyYdb2wyX3nAEACIhoc+JrJq6rOYk4z40P8w+ZEQzjjsg7y4uJ7hJ4NIzV7CzKDDyCMoHvyIEPLQKL1l4h/JZpuyM2CcXkyxJ7axXHBrTvIoyE4NsagQwrpEH7NULX5oXaFRq0vZqewLa1o/CY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728410528; c=relaxed/simple; bh=DlW1BYF5I+ekVrwZJv2kPo1lJwKxZjMXG9k5A5jaR5I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pwS+N1igOgrcgeWBiZJoXHUBp2eftLfPfqbXPqoAzZKSZd+TN/bdaqyq/zbh7horacCCuuTQtAWy72HWV297uIEwgWrRcAFLGe2+5QJ1p7+vtU52q2FmsRb7iIHvDujlBWdDI58/pkzuD5lq1o8LxzFHnh0n89tzd737RnXtavg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ff85OgM3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ff85OgM3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB69EC4CECF; Tue, 8 Oct 2024 18:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728410527; bh=DlW1BYF5I+ekVrwZJv2kPo1lJwKxZjMXG9k5A5jaR5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ff85OgM3CGOK+2JpR5LdhR7EI2OQ1jKGDhuSHN4jEjRK39YctO28n6p1xGv8kIQi6 1o3sxMBtWswlf3bROdu87L/lrprjH0TgatM/aHc2TtR6LdV3xUAVYImWUQWeMod0ZU wTwgNRSmjBWxN1TtmFNIEC3eOoJGWnjN8WwFqIhFpoisvmek0USfBl4504JhUQPZ7f Z25RaeFDDlQqgRjBvZ39X0W2sM32HifxTySJ1bQk7Zk7WCMzhuqN3UEV1VKAhANNWU buJkhePPpcj6kY7n8nrVL6C8joZW03t4woyQMnWHoL/rOnyMNNUEBDvE/vEksjduWA 9J8D3gfqzmijQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] kconfig: qconf: reorder code in ConfigMainWindow() constructor Date: Wed, 9 Oct 2024 03:00:07 +0900 Message-ID: <20241008180202.2315986-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008180202.2315986-1-masahiroy@kernel.org> References: <20241008180202.2315986-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Rearrange the code to make the upcoming refactoring easier to understand. No functional changes intended. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 202823aad393..2c80e3e1a91a 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1340,29 +1340,28 @@ ConfigMainWindow::ConfigMainWindow(void) ConfigItem::menubackIcon = QIcon(QPixmap(xpm_menuback)); QWidget *widget = new QWidget(this); - QVBoxLayout *layout = new QVBoxLayout(widget); setCentralWidget(widget); - split1 = new QSplitter(Qt::Horizontal, widget); - split1->setChildrenCollapsible(false); - - menuList = new ConfigList(widget, "menu"); + QVBoxLayout *layout = new QVBoxLayout(widget); split2 = new QSplitter(Qt::Vertical, widget); + layout->addWidget(split2); split2->setChildrenCollapsible(false); - // create config tree + split1 = new QSplitter(Qt::Horizontal, widget); + split2->addWidget(split1); + split1->setChildrenCollapsible(false); + configList = new ConfigList(widget, "config"); + split1->addWidget(configList); + + menuList = new ConfigList(widget, "menu"); + split1->addWidget(menuList); helpText = new ConfigInfoView(widget, "help"); - - layout->addWidget(split2); - split2->addWidget(split1); - split1->addWidget(configList); - split1->addWidget(menuList); split2->addWidget(helpText); - setTabOrder(configList, helpText); + configList->setFocus(); backAction = new QAction(QPixmap(xpm_back), "Back", this); From patchwork Tue Oct 8 18:00:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13826775 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C48921265E; Tue, 8 Oct 2024 18:02:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728410529; cv=none; b=dbW4xx5ychIhcAaA55GyStyxPiuTKvfrZjNn0UK/ix/XiWmuD0xzwwL4taExC/WbRVAT12F+R0lBeSYT9LA6k6nm/vcLzOLHT3xc/8CgLYMMVdX1DSv1gVGAOlxMvlfhiDSKZJs4eBIRMiR9Lweaa0af5dlflNj8TSOlXUeZvN4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728410529; c=relaxed/simple; bh=Aj8MRXdAF0FU/OtWsSWS77NgF3PV0MC2b7n7AEG2Co8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Py0idP788CGqM0XKFQMGmUjlwMZg/gftTdPJ6fmH1/rCBzfE54T30AjeRthOLdV6XZpaC0d7dDW7SNRtQcUQSh8xipm7sW+hChkHBHFYRQ2Sx74KnYWomOFSdCb3aEFiDcm8Tr8Zl9d27dwZv0sDVdJU10hUGOXW7xa/IHJ+Pdo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tb1I7frV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tb1I7frV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37985C4CEC7; Tue, 8 Oct 2024 18:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728410529; bh=Aj8MRXdAF0FU/OtWsSWS77NgF3PV0MC2b7n7AEG2Co8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tb1I7frV7i0xeKJex85mL4mgBi6Cci2mAuQ34eu8hkQDX9vDmKn49XH62GsCeXfP7 Fvh3otYKXe49fL8O9KugMR2MRuxqi2qvsac/8ZBLVGmEArALscGCbxoBglaW7Y6VJO 8XGAnA8HmvpnU9IHIvpS0wvxTnv9h7QCA4eDFf5PK4VLmnH/TcIRft5P659PvcIk3O lUwtkjWliF0Fipx9YKC+a1RExdiKKjVSkK/Dig1a43z1w3sHKwCvnqvlkPD10JSza0 WsJbz4PJ2LshheBj8/cO1A+q1qm0tXGb+TE1oGP3nXVvXoybv+J01kPREy6IN8+LiS qZYWReSH2YEcQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] kconfig: qconf: set parent in the widget constructor Date: Wed, 9 Oct 2024 03:00:08 +0900 Message-ID: <20241008180202.2315986-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008180202.2315986-1-masahiroy@kernel.org> References: <20241008180202.2315986-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The ->addWidget() method re-parents the widget. The parent QWidget can be specified directly in the constructor. Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 2c80e3e1a91a..7bac48ac5d21 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1348,18 +1348,14 @@ ConfigMainWindow::ConfigMainWindow(void) layout->addWidget(split2); split2->setChildrenCollapsible(false); - split1 = new QSplitter(Qt::Horizontal, widget); - split2->addWidget(split1); + split1 = new QSplitter(Qt::Horizontal, split2); split1->setChildrenCollapsible(false); - configList = new ConfigList(widget, "config"); - split1->addWidget(configList); + configList = new ConfigList(split1, "config"); - menuList = new ConfigList(widget, "menu"); - split1->addWidget(menuList); + menuList = new ConfigList(split1, "menu"); - helpText = new ConfigInfoView(widget, "help"); - split2->addWidget(helpText); + helpText = new ConfigInfoView(split2, "help"); setTabOrder(configList, helpText); configList->setFocus();