forked from qt-creator/qt-creator
Qml Profilder Views: Make consistent with other views
Use double click on double click platforms, fix keyboard activation Change-Id: I36891fb2f733684a1a5c3787e0682cb9ddccb0d3 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
This commit is contained in:
@@ -381,7 +381,7 @@ QmlProfilerEventsMainView::QmlProfilerEventsMainView(QWidget *parent,
|
|||||||
|
|
||||||
d->m_model = new QStandardItemModel(this);
|
d->m_model = new QStandardItemModel(this);
|
||||||
setModel(d->m_model);
|
setModel(d->m_model);
|
||||||
connect(this,SIGNAL(clicked(QModelIndex)), this,SLOT(jumpToItem(QModelIndex)));
|
connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(jumpToItem(QModelIndex)));
|
||||||
|
|
||||||
d->modelProxy = modelProxy;
|
d->modelProxy = modelProxy;
|
||||||
connect(d->modelProxy,SIGNAL(dataAvailable()), this, SLOT(buildModel()));
|
connect(d->modelProxy,SIGNAL(dataAvailable()), this, SLOT(buildModel()));
|
||||||
@@ -831,7 +831,7 @@ QmlProfilerEventRelativesView::QmlProfilerEventRelativesView(QmlProfilerModelMan
|
|||||||
setRootIsDecorated(false);
|
setRootIsDecorated(false);
|
||||||
updateHeader();
|
updateHeader();
|
||||||
|
|
||||||
connect(this,SIGNAL(clicked(QModelIndex)), this,SLOT(jumpToItem(QModelIndex)));
|
connect(this,SIGNAL(activated(QModelIndex)), this,SLOT(jumpToItem(QModelIndex)));
|
||||||
|
|
||||||
// Clear when new data available as the selection may be invalid now.
|
// Clear when new data available as the selection may be invalid now.
|
||||||
connect(d->modelProxy, SIGNAL(dataAvailable()), this, SLOT(clear()));
|
connect(d->modelProxy, SIGNAL(dataAvailable()), this, SLOT(clear()));
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qmlprofilertreeview.h"
|
#include "qmlprofilertreeview.h"
|
||||||
|
#include <utils/itemviews.h>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ namespace QmlProfiler {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
QmlProfilerTreeView::QmlProfilerTreeView(QWidget *parent)
|
QmlProfilerTreeView::QmlProfilerTreeView(QWidget *parent)
|
||||||
: QTreeView(parent)
|
: Utils::TreeView(parent)
|
||||||
{
|
{
|
||||||
setFrameStyle(QFrame::NoFrame);
|
setFrameStyle(QFrame::NoFrame);
|
||||||
header()->setResizeMode(QHeaderView::Interactive);
|
header()->setResizeMode(QHeaderView::Interactive);
|
||||||
|
|||||||
@@ -30,12 +30,12 @@
|
|||||||
#ifndef QMLPROFILERTREEVIEW
|
#ifndef QMLPROFILERTREEVIEW
|
||||||
#define QMLPROFILERTREEVIEW
|
#define QMLPROFILERTREEVIEW
|
||||||
|
|
||||||
#include <QTreeView>
|
#include <utils/itemviews.h>
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QmlProfilerTreeView : public QTreeView
|
class QmlProfilerTreeView : public Utils::TreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ QV8ProfilerEventsMainView::QV8ProfilerEventsMainView(QWidget *parent,
|
|||||||
|
|
||||||
d->m_model = new QStandardItemModel(this);
|
d->m_model = new QStandardItemModel(this);
|
||||||
setModel(d->m_model);
|
setModel(d->m_model);
|
||||||
connect(this,SIGNAL(clicked(QModelIndex)), this,SLOT(jumpToItem(QModelIndex)));
|
connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(jumpToItem(QModelIndex)));
|
||||||
|
|
||||||
d->m_v8Model = v8Model;
|
d->m_v8Model = v8Model;
|
||||||
connect(d->m_v8Model, SIGNAL(changed()), this, SLOT(buildModel()));
|
connect(d->m_v8Model, SIGNAL(changed()), this, SLOT(buildModel()));
|
||||||
@@ -631,7 +631,7 @@ QV8ProfilerEventRelativesView::QV8ProfilerEventRelativesView(QV8ProfilerDataMode
|
|||||||
updateHeader();
|
updateHeader();
|
||||||
setSortingEnabled(false);
|
setSortingEnabled(false);
|
||||||
|
|
||||||
connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(jumpToItem(QModelIndex)));
|
connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(jumpToItem(QModelIndex)));
|
||||||
}
|
}
|
||||||
|
|
||||||
QV8ProfilerEventRelativesView::~QV8ProfilerEventRelativesView()
|
QV8ProfilerEventRelativesView::~QV8ProfilerEventRelativesView()
|
||||||
|
|||||||
Reference in New Issue
Block a user