From patchwork Tue May 24 18:16:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 812862 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4OIGrsQ026703 for ; Tue, 24 May 2011 18:16:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932612Ab1EXSQb (ORCPT ); Tue, 24 May 2011 14:16:31 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:43990 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932506Ab1EXSQ3 (ORCPT ); Tue, 24 May 2011 14:16:29 -0400 Received: by yxs7 with SMTP id 7so2697112yxs.19 for ; Tue, 24 May 2011 11:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=vg6VUwi8clE6rvD/m1pAdGS1c1ED/L5w2iFbiOHHA+0=; b=W8hS0CRMqXZCvoAMOIPvC+IDYHiBxKmsSlNUlYYpILXxIxBUGT9g0/5B8tAW2xVTkz SstrVVYVYYYVt+WJkHxovOtOHi+6kDs6cW0Y6hirmbNqk4Y4jYpKjVk+IWzfJd7rE4+B D5QbL0l+Zrmc4boCPzBzDGlLGeTa/T5H1HsAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=arhnpns1mJ9CZQjuvSx0suII4RRG599h2Nr6vXSXg6530PrDhoATGDio2OeM3v914p RwhhtQa4vmJdyliRAa+7dYzsDo5Z3DVzuo9F/YofIgnzwfYUTooJ+HelpLsEOxGzuZc9 8ZIhrjfH7fxjo+S799fqj/Of/Ov8MVCwnihL8= Received: by 10.236.144.196 with SMTP id n44mr5062214yhj.142.1306260988340; Tue, 24 May 2011 11:16:28 -0700 (PDT) Received: from localhost.localdomain (76-10-146-236.dsl.teksavvy.com [76.10.146.236]) by mx.google.com with ESMTPS id j43sm3321732yhm.90.2011.05.24.11.16.27 (version=SSLv3 cipher=OTHER); Tue, 24 May 2011 11:16:27 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hiromu Yakura , Michal Marek , Arnaud Lacombe Subject: [PATCH] xconfig: merge code path to conf_write() Date: Tue, 24 May 2011 14:16:18 -0400 Message-Id: <1306260978-29437-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 24 May 2011 18:16:53 +0000 (UTC) Michal, Hiromu, That should fix the first error miss in xconfig. I'll have a look tonight to gconf. - Arnaud --- From: Arnaud Lacombe 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 Pointed-out-by: Michal Marek Signed-off-by: Arnaud Lacombe --- 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;