Commit 4223d76c authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Rename "events" to "statistics" view

Change-Id: Id552e0ead056214a7d72dd618c54897b55cd5e38
Reviewed-by: default avatarJoerg Bornemann <>
parent df4e46ff
......@@ -521,9 +521,9 @@
\li None
\section1 Viewing Events
\section1 Viewing Statistics
The \uicontrol Events view displays the number of times each binding, create,
The \uicontrol Statistics view displays the number of times each binding, create,
compile, JavaScript, or signal event is triggered and the average time it
takes. This allows you to examine which events you need to optimize. A high
number of occurrences might indicate that an event is triggered
......@@ -533,7 +533,7 @@
Click on an event to move to it in the source code
in the code editor.
\image qtcreator-analyzer-bindings.png "Events view"
\image qtcreator-analyzer-bindings.png "Statistics view"
The \uicontrol Callers and \uicontrol Callees panes show dependencies between events.
They allow you to examine the internal functions of the application.
......@@ -545,13 +545,13 @@
Click on an event to move to it in the source code in the code editor.
When you select an event in the \uicontrol Timeline view, information about it is
displayed in the \uicontrol Events view. To view an event range in the \uicontrol Events
view, select \uicontrol {Limit Events Pane to Current Range} in the context menu
in the \uicontrol Timeline view.
displayed in the \uicontrol Statistics view. To view an event range in the
\uicontrol Statistics view, select \uicontrol {Limit Statistics Pane to Current Range}
in the context menu in the \uicontrol Timeline view.
To copy the contents of one view or row to the clipboard, select
\uicontrol {Copy Table} or \uicontrol {Copy Row} in the context menu.
JavaScript events are shown in the \uicontrol Events view only for applications
JavaScript events are shown in the \uicontrol Statistics view only for applications
that use Qt Quick 2 and are compiled with Qt 5.3 or later.
......@@ -14,7 +14,6 @@ SOURCES += \
qmlprofilerdatamodel.cpp \
qmlprofilerdetailsrewriter.cpp \
qmlprofilereventsmodelproxy.cpp \
qmlprofilereventview.cpp \
qmlprofilermodelmanager.cpp \
qmlprofilernotesmodel.cpp \
qmlprofileroptionspage.cpp \
......@@ -26,6 +25,7 @@ SOURCES += \
qmlprofilersettings.cpp \
qmlprofilerstatemanager.cpp \
qmlprofilerstatewidget.cpp \
qmlprofilerstatisticsview.cpp \
qmlprofilertimelinemodel.cpp \
qmlprofilertimelinemodelfactory.cpp \
qmlprofilertool.cpp \
......@@ -45,7 +45,7 @@ HEADERS += \
qmlprofilerdatamodel.h \
qmlprofilerdetailsrewriter.h \
qmlprofilereventsmodelproxy.h \
qmlprofilereventview.h \
qmlprofilereventsview.h \
qmlprofilermodelmanager.h \
qmlprofilernotesmodel.h \
qmlprofileroptionspage.h \
......@@ -57,6 +57,7 @@ HEADERS += \
qmlprofilersettings.h \
qmlprofilerstatemanager.h \
qmlprofilerstatewidget.h \
qmlprofilerstatisticsview.h \
qmlprofilertimelinemodel.h \
qmlprofilertimelinemodelfactory.h \
qmlprofilertool.h \
......@@ -30,7 +30,7 @@ QtcPlugin {
"qmlprofilerdatamodel.cpp", "qmlprofilerdatamodel.h",
"qmlprofilerdetailsrewriter.cpp", "qmlprofilerdetailsrewriter.h",
"qmlprofilereventsmodelproxy.cpp", "qmlprofilereventsmodelproxy.h",
"qmlprofilereventview.cpp", "qmlprofilereventview.h",
"qmlprofilermodelmanager.cpp", "qmlprofilermodelmanager.h",
"qmlprofilernotesmodel.cpp", "qmlprofilernotesmodel.h",
"qmlprofileroptionspage.cpp", "qmlprofileroptionspage.h",
......@@ -42,6 +42,7 @@ QtcPlugin {
"qmlprofilersettings.cpp", "qmlprofilersettings.h",
"qmlprofilerstatemanager.cpp", "qmlprofilerstatemanager.h",
"qmlprofilerstatewidget.cpp", "qmlprofilerstatewidget.h",
"qmlprofilerstatisticsview.cpp", "qmlprofilerstatisticsview.h",
"qmlprofilertimelinemodel.cpp", "qmlprofilertimelinemodel.h",
"qmlprofilertimelinemodelfactory.cpp", "qmlprofilertimelinemodelfactory.h",
"qmlprofilertool.cpp", "qmlprofilertool.h",
** Copyright (C) 2015 The Qt Company Ltd.
** Contact:
** This file is part of Qt Creator.
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see For further information
** use the contact form at
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: and
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#include "qmlprofiler_global.h"
#include <QAbstractItemModel>
#include <QWidget>
namespace QmlProfiler {
class QMLPROFILER_EXPORT QmlProfilerEventsView : public QWidget
QmlProfilerEventsView(QWidget *parent = 0) : QWidget(parent) {}
virtual void clear() = 0;
virtual void restrictToRange(qint64 rangeStart, qint64 rangeEnd) = 0;
virtual bool isRestrictedToRange() const = 0;
void gotoSourceLocation(const QString &fileName, int lineNumber, int columnNumber);
void typeSelected(int typeIndex);
public slots:
virtual void selectByTypeId(int typeIndex) = 0;
virtual void onVisibleFeaturesChanged(quint64 features) = 0;
......@@ -28,12 +28,13 @@
#include "qmlprofilermodelmanager.h"
#include "qmlprofilereventsmodelproxy.h"
#include "qmlprofilerviewmanager.h"
#include "qmlprofilereventsview.h"
#include <qmldebug/qmlprofilereventtypes.h>
#include <analyzerbase/ianalyzertool.h>
......@@ -44,9 +45,8 @@
namespace QmlProfiler {
namespace Internal {
class QmlProfilerEventsMainView;
class QmlProfilerEventChildrenView;
class QmlProfilerEventRelativesView;
class QmlProfilerStatisticsMainView;
class QmlProfilerStatisticsRelativesView;
enum ItemRole {
SortRole = Qt::UserRole + 1, // Sort by data, not by displayed string
......@@ -77,27 +77,26 @@ enum Fields {
class QmlProfilerEventsWidget : public QWidget
class QmlProfilerStatisticsView : public QmlProfilerEventsView
explicit QmlProfilerEventsWidget(QWidget *parent,
QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *profilerModelManager );
explicit QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *profilerModelManager);
void clear();
void restrictToRange(qint64 rangeStart, qint64 rangeEnd);
bool isRestrictedToRange() const;
void clear() override;
void restrictToRange(qint64 rangeStart, qint64 rangeEnd) override;
bool isRestrictedToRange() const override;
void gotoSourceLocation(const QString &fileName, int lineNumber, int columnNumber);
void typeSelected(int typeIndex);
public slots:
void selectByTypeId(int typeIndex);
void onVisibleFeaturesChanged(quint64 features);
void selectByTypeId(int typeIndex) override;
void onVisibleFeaturesChanged(quint64 features) override;
void contextMenuEvent(QContextMenuEvent *ev);
......@@ -110,17 +109,17 @@ private:
void setShowExtendedStatistics(bool show);
bool showExtendedStatistics() const;
class QmlProfilerEventsWidgetPrivate;
QmlProfilerEventsWidgetPrivate *d;
class QmlProfilerStatisticsViewPrivate;
QmlProfilerStatisticsViewPrivate *d;
class QmlProfilerEventsMainView : public Utils::TreeView
class QmlProfilerStatisticsMainView : public Utils::TreeView
explicit QmlProfilerEventsMainView(QWidget *parent,
QmlProfilerEventsModelProxy *modelProxy);
explicit QmlProfilerStatisticsMainView(QWidget *parent,
QmlProfilerEventsModelProxy *modelProxy);
void setFieldViewable(Fields field, bool show);
void setShowAnonymousEvents( bool showThem );
......@@ -156,18 +155,18 @@ private:
QStandardItem *itemFromIndex(const QModelIndex &index) const;
class QmlProfilerEventsMainViewPrivate;
QmlProfilerEventsMainViewPrivate *d;
class QmlProfilerStatisticsMainViewPrivate;
QmlProfilerStatisticsMainViewPrivate *d;
class QmlProfilerEventRelativesView : public Utils::TreeView
class QmlProfilerStatisticsRelativesView : public Utils::TreeView
explicit QmlProfilerEventRelativesView(QmlProfilerEventRelativesModelProxy *modelProxy,
QWidget *parent );
explicit QmlProfilerStatisticsRelativesView(QmlProfilerEventRelativesModelProxy *modelProxy,
QWidget *parent );
void typeClicked(int typeIndex);
......@@ -183,11 +182,11 @@ private:
void updateHeader();
QStandardItemModel *treeModel();
class QmlProfilerEventParentsViewPrivate;
QmlProfilerEventParentsViewPrivate *d;
class QmlProfilerStatisticsRelativesViewPrivate;
QmlProfilerStatisticsRelativesViewPrivate *d;
} // namespace Internal
} // namespace QmlProfiler
......@@ -248,11 +248,11 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
QAction *getLocalStatsAction = menu.addAction(tr("Limit Events Pane to Current Range"));
QAction *getLocalStatsAction = menu.addAction(tr("Limit Statistics Pane to Current Range"));
if (!d->m_viewContainer->hasValidSelection())
QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range in Events Pane"));
QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range in Statistics Pane"));
if (!d->m_viewContainer->isEventsRestrictedToRange())
......@@ -31,7 +31,7 @@
#include "qmlprofilerviewmanager.h"
#include "qmlprofilertraceview.h"
#include "qmlprofilereventview.h"
#include "qmlprofilerstatisticsview.h"
#include "qmlprofilertool.h"
#include "qmlprofilerstatemanager.h"
#include "qmlprofilermodelmanager.h"
......@@ -54,7 +54,7 @@ public:
QDockWidget *timelineDock;
QmlProfilerTraceView *traceView;
QmlProfilerEventsWidget *eventsView;
QmlProfilerStatisticsView *eventsView;
QmlProfilerStateManager *profilerState;
QmlProfilerModelManager *profilerModelManager;
QmlProfilerTool *profilerTool;
......@@ -96,17 +96,17 @@ void QmlProfilerViewManager::createViews()
connect(d->traceView, &QmlProfilerTraceView::gotoSourceLocation,
this, &QmlProfilerViewManager::gotoSourceLocation);
d->eventsView = new QmlProfilerEventsWidget(mw, d->profilerTool, this,
d->eventsView = new QmlProfilerStatisticsView(mw, d->profilerTool, this,
connect(d->eventsView, &QmlProfilerEventsWidget::gotoSourceLocation,
connect(d->eventsView, &QmlProfilerStatisticsView::gotoSourceLocation,
this, &QmlProfilerViewManager::gotoSourceLocation);
connect(d->eventsView, &QmlProfilerEventsWidget::typeSelected,
connect(d->eventsView, &QmlProfilerStatisticsView::typeSelected,
d->traceView, &QmlProfilerTraceView::selectByTypeId);
connect(d->traceView, &QmlProfilerTraceView::typeSelected,
d->eventsView, &QmlProfilerEventsWidget::selectByTypeId);
d->eventsView, &QmlProfilerStatisticsView::selectByTypeId);
connect(d->profilerModelManager, &QmlProfilerModelManager::visibleFeaturesChanged,
d->eventsView, &QmlProfilerEventsWidget::onVisibleFeaturesChanged);
d->eventsView, &QmlProfilerStatisticsView::onVisibleFeaturesChanged);
QDockWidget *eventsDock = AnalyzerManager::createDockWidget
(Constants::QmlProfilerToolId, d->eventsView);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment