All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>, 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	[thread overview]
Message-ID: <20200807091909.2985787-7-masahiroy@kernel.org> (raw)
In-Reply-To: <20200807091909.2985787-1-masahiroy@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 <masahiroy@kernel.org>
---

(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<int> 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<int> 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);
-- 
2.25.1


  parent reply	other threads:[~2020-08-07  9:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  9:18 [PATCH v2 01/19] kconfig: qconf: remove ->addSeparator() to menuBar Masahiro Yamada
2020-08-07  9:18 ` [PATCH v2 02/19] kconfig: qconf: do not use 'menu' variable for (QMenuBar *) Masahiro Yamada
2020-08-07  9:18 ` [PATCH v2 03/19] kconfig: qconf: use 'menu' variable for (QMenu *) Masahiro Yamada
2020-08-07  9:18 ` [PATCH v2 04/19] kconfig: qconf: remove toolBar from ConfigMainWindow members Masahiro Yamada
2020-08-07  9:18 ` [PATCH v2 05/19] kconfig: qconf: overload addToolBar() to create and insert toolbar Masahiro Yamada
2020-08-07  9:18 ` [PATCH v2 06/19] kconfig: qconf: remove unused ConfigList::listView() Masahiro Yamada
2020-08-07  9:18 ` Masahiro Yamada [this message]
2020-08-07  9:18 ` [PATCH v2 08/19] kconfig: qconf: omit parent to QHBoxLayout() Masahiro Yamada
2020-08-07  9:18 ` [PATCH v2 09/19] kconfig: qconf: remove unused argument from ConfigList::updateList() Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 10/19] kconfig: qconf: remove unused argument from ConfigView::updateList() Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 11/19] kconfig: qconf: remove 'parent' from ConfigList::updateMenuList() Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 12/19] kconfig: qconf: drop more localization code Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 13/19] kconfig: qconf: remove ConfigItem::pixmap/setPixmap Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 14/19] kconfig: qconf: remove ConfigList::addColumn/removeColumn Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 15/19] kconfig: qconf: remove ConfigItem::text/setText Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 16/19] kconfig: qconf: remove unused voidPix, menuInvPix Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 17/19] kconfig: qconf: refactor icon setups Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 18/19] kconfig: qconf: do not limit the pop-up menu to the first row Masahiro Yamada
2020-08-07  9:19 ` [PATCH v2 19/19] kconfig: qconf: move setOptionMode() to ConfigList from ConfigView Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200807091909.2985787-7-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.