public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Lacombe <lacombar@gmail.com>
To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Hiromu Yakura <hiromu1996@gmail.com>,
	Michal Marek <mmarek@suse.cz>,
	Arnaud Lacombe <lacombar@gmail.com>
Subject: [PATCH] xconfig: merge code path to conf_write()
Date: Tue, 24 May 2011 14:16:18 -0400	[thread overview]
Message-ID: <1306260978-29437-1-git-send-email-lacombar@gmail.com> (raw)

Michal, Hiromu,

That should fix the first error miss in xconfig. I'll have a look tonight to
gconf.

 - Arnaud

---

From: Arnaud Lacombe <lacombar@gmail.com>
Subject: [PATCH] xconfig: merge code path to conf_write()

Avoid to have multiple path saving the config. This fixes an error check miss
when the window is being closed and the user requested the config to be written.

Reported-by: Hiromu Yakura <hiromu1996@gmail.com>
Pointed-out-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
 scripts/kconfig/qconf.cc |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 06dd2e3..c2796b8 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1489,8 +1489,7 @@ void ConfigMainWindow::saveConfigAs(void)
 	QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this);
 	if (s.isNull())
 		return;
-	if (conf_write(QFile::encodeName(s)))
-		QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
+	saveConfig();
 }
 
 void ConfigMainWindow::searchConfig(void)
@@ -1643,7 +1642,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
 	mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
 	switch (mb.exec()) {
 	case QMessageBox::Yes:
-		conf_write(NULL);
+		saveConfig();
 	case QMessageBox::No:
 		e->accept();
 		break;
-- 
1.7.3.4.574.g608b.dirty


             reply	other threads:[~2011-05-24 18:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 18:16 Arnaud Lacombe [this message]
2011-05-25 13:18 ` [PATCH] xconfig: merge code path to conf_write() Michal Marek
2011-07-25 13:53   ` Michal Marek
2011-07-25 15:25     ` Arnaud Lacombe
2011-07-25 21:24       ` Michal Marek

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=1306260978-29437-1-git-send-email-lacombar@gmail.com \
    --to=lacombar@gmail.com \
    --cc=hiromu1996@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox