From patchwork Tue Jul 2 15:22:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: davidgraeff X-Patchwork-Id: 2813471 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E82C1BF4A1 for ; Tue, 2 Jul 2013 15:24:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9882220153 for ; Tue, 2 Jul 2013 15:24:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15A7A20157 for ; Tue, 2 Jul 2013 15:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753096Ab3GBPXo (ORCPT ); Tue, 2 Jul 2013 11:23:44 -0400 Received: from mail-ee0-f42.google.com ([74.125.83.42]:60762 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989Ab3GBPXn (ORCPT ); Tue, 2 Jul 2013 11:23:43 -0400 Received: by mail-ee0-f42.google.com with SMTP id c4so2875064eek.1 for ; Tue, 02 Jul 2013 08:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Vl0ukzgbbUCN3S/qqTRORPtcBZ31Lrd8Wrvbqt4ngng=; b=D7tR9WU0OM3vr+u5gMXMImDzMUYYT4g+dn2V1mz+moaNMuiEZLUIOBNDE+09DWuFce E3qS5QokQSIKTWSSkovp5lKgy+IpJq855962s4RcSb9re3wgn4zzyvLlPYMsp4JybK6P a08BgegQj9lPBLwEfGMXQeB5tnFgoR3hINsAXn+X4t/11eikSetSIQgZOxIVTiKEqySW 5BhUIDP4T0PSfQWglisP6vGHZY+AgXwLoQXteALWoljW9ME6aA3yuEY0I67Fn9Vfr3l3 vYXmF5kSyy8dFRJH7K2KwxXMrQ0yTKLsvJi5Zyffk6Zvxgb9EaPnkD+0CIwwu48zwdmt 817w== X-Received: by 10.14.178.8 with SMTP id e8mr26854693eem.20.1372778622407; Tue, 02 Jul 2013 08:23:42 -0700 (PDT) Received: from localhost.localdomain (ip-95-223-112-226.unitymediagroup.de. [95.223.112.226]) by mx.google.com with ESMTPSA id l42sm37233028eeo.14.2013.07.02.08.23.41 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 08:23:41 -0700 (PDT) From: davidgraeff To: Michal Marek Cc: linux-kbuild@vger.kernel.org, davidgraeff Subject: [PATCH 9/9] kconfig: qt flavour, add missing updateTree Date: Tue, 2 Jul 2013 17:22:30 +0200 Message-Id: <1372778550-22110-10-git-send-email-david.graeff@web.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1372778550-22110-1-git-send-email-david.graeff@web.de> References: <1372778550-22110-1-git-send-email-david.graeff@web.de> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * Remove all #includes for moc files * Add ui option to show/hide subtrees of disabled options. * Update the entire model on current item change like gconf --- scripts/kconfig/qconfig/infoViewWidget.cc | 4 +--- scripts/kconfig/qconfig/mainwindow.cc | 22 +++++++++++++--------- scripts/kconfig/qconfig/mainwindow.h | 2 ++ scripts/kconfig/qconfig/mainwindow.ui | 16 ++++++++++++++++ scripts/kconfig/qconfig/searchfiltermodelproxy.cc | 4 +--- scripts/kconfig/qconfig/searchmodel.cc | 4 +--- 6 files changed, 34 insertions(+), 18 deletions(-) diff --git a/scripts/kconfig/qconfig/infoViewWidget.cc b/scripts/kconfig/qconfig/infoViewWidget.cc index 21024a8..abcfa09 100644 --- a/scripts/kconfig/qconfig/infoViewWidget.cc +++ b/scripts/kconfig/qconfig/infoViewWidget.cc @@ -10,9 +10,7 @@ #include #include "../expr.h" #include "../lkc.h" -#ifdef INCLUDEMOC -#include "infoViewWidget.moc" -#endif + InfoViewWidget::InfoViewWidget(QWidget* parent) : Parent(parent), sym(0), _menu(0) { diff --git a/scripts/kconfig/qconfig/mainwindow.cc b/scripts/kconfig/qconfig/mainwindow.cc index 04216f9..bb7870e 100644 --- a/scripts/kconfig/qconfig/mainwindow.cc +++ b/scripts/kconfig/qconfig/mainwindow.cc @@ -20,9 +20,7 @@ #include "../images.c" #include "../expr.h" #include "../lkc.h" -#ifdef INCLUDEMOC -#include "mainwindow.moc" -#endif + bool qconf_MainWindow::check_conf_changed() { bool changed = conf_get_changed(); @@ -291,12 +289,13 @@ void qconf_MainWindow::on_actionLoad_triggered() void qconf_MainWindow::on_actionBack_triggered() { - QModelIndex parent = ui->treeAll->rootIndex().parent(); - if (view_mode==SINGLE_VIEW) { - ui->treeAll->setRootIndex(parent); - ui->actionBack->setEnabled(parent.isValid()); - updateCurrentPositionLabel(); - } + // if (view_mode==SINGLE_VIEW) + QModelIndex current = ui->treeAll->rootIndex(); + QModelIndex parent = current.parent(); + ui->treeAll->setRootIndex(parent); + ui->actionBack->setEnabled(parent.isValid()); + ui->treeAll->scrollTo(current); + updateCurrentPositionLabel(); } void qconf_MainWindow::on_actionSingleView_triggered() @@ -376,3 +375,8 @@ void qconf_MainWindow::updateCurrentPositionLabel() } ui->labelPosition->setText(t); } + +void qconf_MainWindow::on_actionHide_disabled_subtrees_triggered() +{ + mBaseModel->setHideChildren(ui->actionHide_disabled_subtrees->isChecked()); +} diff --git a/scripts/kconfig/qconfig/mainwindow.h b/scripts/kconfig/qconfig/mainwindow.h index e741386..c52db88 100644 --- a/scripts/kconfig/qconfig/mainwindow.h +++ b/scripts/kconfig/qconfig/mainwindow.h @@ -45,6 +45,8 @@ private Q_SLOTS: void on_treeAll_activated(const QModelIndex &index); void on_listSearch_clicked(const QModelIndex &index); + void on_actionHide_disabled_subtrees_triggered(); + private: Ui::qconf_MainWindow *ui; ConfigModel* mBaseModel; diff --git a/scripts/kconfig/qconfig/mainwindow.ui b/scripts/kconfig/qconfig/mainwindow.ui index c6662af..0f548c8 100644 --- a/scripts/kconfig/qconfig/mainwindow.ui +++ b/scripts/kconfig/qconfig/mainwindow.ui @@ -20,6 +20,9 @@ Qt::Horizontal + + false + 0 @@ -149,6 +152,8 @@ Option + + @@ -380,6 +385,17 @@ FullView + + + true + + + true + + + Hide disabled subtrees + + diff --git a/scripts/kconfig/qconfig/searchfiltermodelproxy.cc b/scripts/kconfig/qconfig/searchfiltermodelproxy.cc index daebe9f..5cf9377 100644 --- a/scripts/kconfig/qconfig/searchfiltermodelproxy.cc +++ b/scripts/kconfig/qconfig/searchfiltermodelproxy.cc @@ -4,9 +4,7 @@ */ #include "searchfiltermodelproxy.h" #include "configModel.h" -#ifdef INCLUDEMOC -#include "searchfiltermodelproxy.moc" -#endif + SearchFilterModelProxy::SearchFilterModelProxy(QObject *parent) : QSortFilterProxyModel(parent) { diff --git a/scripts/kconfig/qconfig/searchmodel.cc b/scripts/kconfig/qconfig/searchmodel.cc index 974ad53..b98311a 100644 --- a/scripts/kconfig/qconfig/searchmodel.cc +++ b/scripts/kconfig/qconfig/searchmodel.cc @@ -2,9 +2,7 @@ #include #include "../expr.h" #include "../lkc.h" -#ifdef INCLUDEMOC -#include "searchmodel.moc" -#endif + SearchModel::item::item(struct menu* menu) { this->menu = menu;