From accbf545f6794b0b7b40b755f070c080efe242df Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Wed, 9 Apr 2014 18:04:31 +0200 Subject: [PATCH] DeviceProcessDialog: Use Utils::TreeView Should not change any behavior. Change-Id: Ibe3ac32aea4c25f8752c83dd711eceb1ccd19f23 Reviewed-by: Christian Kandeler --- .../devicesupport/deviceprocessesdialog.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp index f6105e41b84..8905be3c002 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -44,7 +45,6 @@ #include #include #include -#include #include using namespace Utils; @@ -113,7 +113,7 @@ public: QLabel *kitLabel; KitChooser *kitChooser; - QTreeView *procView; + Utils::TreeView *procView; QTextBrowser *errorText; FancyLineEdit *processFilterLineEdit; QPushButton *updateListButton; @@ -143,7 +143,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, kitChooser->populate(); - procView = new QTreeView(q); + procView = new Utils::TreeView(q); procView->setModel(&proxyModel); procView->setSelectionBehavior(QAbstractItemView::SelectRows); procView->setSelectionMode(QAbstractItemView::SingleSelection); @@ -154,6 +154,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, procView->header()->setDefaultSectionSize(100); procView->header()->setStretchLastSection(true); procView->sortByColumn(1, Qt::AscendingOrder); + procView->setActivationMode(Utils::DoubleClickActivation); errorText = new QTextBrowser(q); @@ -331,8 +332,8 @@ void DeviceProcessesDialog::addAcceptButton(const QString &label) { d->acceptButton = new QPushButton(label); d->buttonBox->addButton(d->acceptButton, QDialogButtonBox::AcceptRole); - connect(d->procView, SIGNAL(doubleClicked(QModelIndex)), - d->acceptButton, SLOT(animateClick())); + connect(d->procView, SIGNAL(activated(QModelIndex)), + d->acceptButton, SLOT(click())); d->buttonBox->addButton(QDialogButtonBox::Cancel); }