Commit 1fd14c4c authored by Ulf Hermann's avatar Ulf Hermann Committed by Kai Koehne
Browse files

Disable the Javascript profiler while there is no data available.

With V4 the Javascript profiler is unusable. In order not to suggest to
the user that it is actually usable, we disable it if it doesn't show
any data. However, when profiling applications that don't use V4, yet,
the JS profiler actually works and has to be enabled.

Change-Id: Iecb97c0940addd157c5ebe229edb614448cc0554
Reviewed-by: default avatarKai Koehne <>
parent 4196e9c2
......@@ -135,6 +135,7 @@ QV8ProfilerEventsWidget::QV8ProfilerEventsWidget(QWidget *parent,
connect(d->m_eventTree, SIGNAL(eventSelected(int)), d->m_eventParents, SLOT(displayEvent(int)));
connect(d->m_eventChildren, SIGNAL(eventClicked(int)), d->m_eventTree, SLOT(selectEvent(int)));
connect(d->m_eventParents, SIGNAL(eventClicked(int)), d->m_eventTree, SLOT(selectEvent(int)));
connect(d->v8Model, SIGNAL(changed()), this, SLOT(updateEnabledState()));
// widget arrangement
QVBoxLayout *groupLayout = new QVBoxLayout;
......@@ -156,7 +157,7 @@ QV8ProfilerEventsWidget::QV8ProfilerEventsWidget(QWidget *parent,
d->m_profilerTool = profilerTool;
d->m_viewContainer = container;
......@@ -164,11 +165,17 @@ QV8ProfilerEventsWidget::~QV8ProfilerEventsWidget()
delete d;
void QV8ProfilerEventsWidget::updateEnabledState()
void QV8ProfilerEventsWidget::clear()
QModelIndex QV8ProfilerEventsWidget::selectedItem() const
......@@ -74,6 +74,7 @@ signals:
public slots:
void updateSelectedEvent(int eventId) const;
void selectBySourceLocation(const QString &filename, int line, int column);
void updateEnabledState();
void contextMenuEvent(QContextMenuEvent *ev);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment