Tracing/QmlProfiler/Perfprofiler: Merge modules

Move Tracing Qml Types into the "QtCreator.Tracing" module.
Move QmlProfiler Qml Types into the "QtCreator.QmlProfiler" module.
Move PerfProfiler Qml Types into the "QtCreator.PerfProfiler" module.
And tst_flamegraphview ones into QtCreator.TstTracingFlameGraphView.

... in preparation to register the types declaratively.

Change-Id: Ic0e3863d09b3426fa5b7419116625ad49b817dcf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Alessandro Portale
2021-06-07 02:08:22 +02:00
parent a3391e7b33
commit b730aa6405
29 changed files with 48 additions and 54 deletions

View File

@@ -27,7 +27,7 @@ import QtQuick 2.1
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
ToolBar {
id: buttons

View File

@@ -26,7 +26,7 @@
import QtQuick 2.1
import QtQuick.Controls 2.2
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Item {
id: labelContainer

View File

@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.0
import FlameGraph 1.0
import QtCreator.Tracing 1.0
Item {
id: flamegraphItem

View File

@@ -23,8 +23,7 @@
**
****************************************************************************/
import FlameGraph 1.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
import QtQml 2.2
import QtQuick 2.9

View File

@@ -26,7 +26,7 @@
import QtQuick 2.1
import QtQuick.Controls 2.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
ToolButton {
implicitWidth: 30

View File

@@ -26,7 +26,7 @@
import QtQuick 2.1
import QtQuick.Controls 2.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Rectangle {
id: root

View File

@@ -24,8 +24,7 @@
****************************************************************************/
import QtQuick 2.1
import TimelineOverviewRenderer 1.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Rectangle {
id: overview

View File

@@ -26,7 +26,7 @@
import QtQuick 2.9
import QtQuick.Controls 2.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Item {
id: rangeDetails

View File

@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.1
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Item {
id: rangeMover

View File

@@ -25,7 +25,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.2
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Button {
id: button

View File

@@ -26,8 +26,7 @@
import QtQuick 2.1
import QtQuick.Controls 2.0
import TimelineTheme 1.0
import TimelineTimeFormatter 1.0
import QtCreator.Tracing 1.0
Item {
id: selectionRangeDetails

View File

@@ -24,8 +24,7 @@
****************************************************************************/
import QtQuick 2.1
import TimelineTheme 1.0
import TimelineTimeFormatter 1.0
import QtCreator.Tracing 1.0
Item {
id: timeDisplay

View File

@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.1
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Item {
id: timeMarks

View File

@@ -25,7 +25,7 @@
import QtQuick 2.0
import QtQuick.Controls 2.2
import TimelineRenderer 1.0
import QtCreator.Tracing 1.0
import QtQml.Models 2.1
Flickable {

View File

@@ -25,7 +25,7 @@
import QtQuick 2.0
import QtQml.Models 2.1
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Flickable {
id: categories

View File

@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Item {
id: rulersParent

View File

@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.0
import TimelineTheme 1.0
import QtCreator.Tracing 1.0
Text {
font.pixelSize: 12

View File

@@ -96,7 +96,7 @@ static QObject *createFormatter(QQmlEngine *engine, QJSEngine *scriptEngine)
void TimeFormatter::setupTimeFormatter()
{
static const int typeIndex = qmlRegisterSingletonType<TimeFormatter>(
"TimelineTimeFormatter", 1, 0, "TimeFormatter", createFormatter);
"QtCreator.Tracing", 1, 0, "TimeFormatter", createFormatter);
Q_UNUSED(typeIndex)
}

View File

@@ -112,7 +112,7 @@ static QObject *singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
void TimelineTheme::setupTheme(QQmlEngine *engine)
{
static const int typeIndex = qmlRegisterSingletonType<Utils::Theme>("TimelineTheme", 1, 0,
static const int typeIndex = qmlRegisterSingletonType<Utils::Theme>("QtCreator.Tracing", 1, 0,
"Theme", singletonProvider);
Q_UNUSED(typeIndex)
engine->addImageProvider(QLatin1String("icons"), new TimelineImageIconProvider);

View File

@@ -44,12 +44,12 @@ CtfVisualizerTraceView::CtfVisualizerTraceView(QWidget *parent, CtfVisualizerToo
{
setObjectName(QLatin1String("CtfVisualizerTraceView"));
qmlRegisterType<Timeline::TimelineRenderer>("TimelineRenderer", 1, 0, "TimelineRenderer");
qmlRegisterType<Timeline::TimelineOverviewRenderer>("TimelineOverviewRenderer", 1, 0,
qmlRegisterType<Timeline::TimelineRenderer>("QtCreator.Tracing", 1, 0, "TimelineRenderer");
qmlRegisterType<Timeline::TimelineOverviewRenderer>("QtCreator.Tracing", 1, 0,
"TimelineOverviewRenderer");
qmlRegisterType<Timeline::TimelineZoomControl>();
qmlRegisterType<Timeline::TimelineModel>();
qmlRegisterType<Timeline::TimelineNotesModel>();
qmlRegisterAnonymousType<Timeline::TimelineZoomControl>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<Timeline::TimelineModel>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<Timeline::TimelineNotesModel>("QtCreator.Tracing", 1);
setResizeMode(QQuickWidget::SizeRootObjectToView);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

View File

@@ -23,7 +23,7 @@
**
****************************************************************************/
import PerfProfilerFlameGraphModel 1.0
import QtCreator.PerfProfiler 1.0
import "../tracing/"
FlameGraphView {

View File

@@ -45,9 +45,9 @@ PerfProfilerFlameGraphView::PerfProfilerFlameGraphView(QWidget *parent, PerfProf
PerfProfilerTraceManager *manager = tool->traceManager();
m_model = new PerfProfilerFlameGraphModel(manager);
qmlRegisterType<FlameGraph::FlameGraph>("FlameGraph", 1, 0, "FlameGraph");
qmlRegisterType<FlameGraph::FlameGraph>("QtCreator.Tracing", 1, 0, "FlameGraph");
qmlRegisterUncreatableType<PerfProfilerFlameGraphModel>(
"PerfProfilerFlameGraphModel", 1, 0, "PerfProfilerFlameGraphModel",
"QtCreator.PerfProfiler", 1, 0, "PerfProfilerFlameGraphModel",
QLatin1String("use the context property"));
Timeline::TimelineTheme::setupTheme(engine());

View File

@@ -42,12 +42,12 @@ PerfProfilerTraceView::PerfProfilerTraceView(QWidget *parent, PerfProfilerTool *
{
setObjectName(QLatin1String("PerfProfilerTraceView"));
qmlRegisterType<Timeline::TimelineRenderer>("TimelineRenderer", 1, 0, "TimelineRenderer");
qmlRegisterType<Timeline::TimelineOverviewRenderer>("TimelineOverviewRenderer", 1, 0,
qmlRegisterType<Timeline::TimelineRenderer>("QtCreator.Tracing", 1, 0, "TimelineRenderer");
qmlRegisterType<Timeline::TimelineOverviewRenderer>("QtCreator.Tracing", 1, 0,
"TimelineOverviewRenderer");
qmlRegisterType<Timeline::TimelineZoomControl>();
qmlRegisterType<Timeline::TimelineModel>();
qmlRegisterType<Timeline::TimelineNotesModel>();
qmlRegisterAnonymousType<Timeline::TimelineZoomControl>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<Timeline::TimelineModel>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<Timeline::TimelineNotesModel>("QtCreator.Tracing", 1);
setResizeMode(QQuickWidget::SizeRootObjectToView);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

View File

@@ -46,12 +46,10 @@ FlameGraphView::FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent
setObjectName("QmlProfiler.FlameGraph.Dock");
setWindowTitle(tr("Flame Graph"));
qmlRegisterType<FlameGraph::FlameGraph>("FlameGraph", 1, 0, "FlameGraph");
qmlRegisterUncreatableType<FlameGraphModel>("QmlProfilerFlameGraphModel", 1, 0,
qmlRegisterType<FlameGraph::FlameGraph>("QtCreator.Tracing", 1, 0, "FlameGraph");
qmlRegisterUncreatableType<FlameGraphModel>("QtCreator.QmlProfiler", 1, 0,
"QmlProfilerFlameGraphModel",
QLatin1String("use the context property"));
qmlRegisterUncreatableType<QAbstractItemModel>("AbstractItemModel", 1, 0, "AbstractItemModel",
QLatin1String("only for Qt 5.4"));
Timeline::TimelineTheme::setupTheme(m_content->engine());

View File

@@ -23,7 +23,7 @@
**
****************************************************************************/
import QmlProfilerFlameGraphModel 1.0
import QtCreator.QmlProfiler 1.0
import "../tracing/"
FlameGraphView {

View File

@@ -122,12 +122,12 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag
groupLayout->setContentsMargins(0, 0, 0, 0);
groupLayout->setSpacing(0);
qmlRegisterType<Timeline::TimelineRenderer>("TimelineRenderer", 1, 0, "TimelineRenderer");
qmlRegisterType<Timeline::TimelineOverviewRenderer>("TimelineOverviewRenderer", 1, 0,
qmlRegisterType<Timeline::TimelineRenderer>("QtCreator.Tracing", 1, 0, "TimelineRenderer");
qmlRegisterType<Timeline::TimelineOverviewRenderer>("QtCreator.Tracing", 1, 0,
"TimelineOverviewRenderer");
qmlRegisterType<Timeline::TimelineZoomControl>();
qmlRegisterType<Timeline::TimelineModel>();
qmlRegisterType<Timeline::TimelineNotesModel>();
qmlRegisterAnonymousType<Timeline::TimelineZoomControl>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<Timeline::TimelineModel>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<Timeline::TimelineNotesModel>("QtCreator.Tracing", 1);
d->m_mainView = new QQuickWidget(this);
d->m_mainView->setResizeMode(QQuickWidget::SizeRootObjectToView);

View File

@@ -23,7 +23,7 @@
**
****************************************************************************/
import TestFlameGraphModel 1.0
import QtCreator.TstTracingFlameGraphView 1.0
import "../tracing/"
FlameGraphView {

View File

@@ -127,9 +127,9 @@ private:
void tst_FlameGraphView::initTestCase()
{
model.fill();
qmlRegisterType<FlameGraph::FlameGraph>("FlameGraph", 1, 0, "FlameGraph");
qmlRegisterType<FlameGraph::FlameGraph>("QtCreator.Tracing", 1, 0, "FlameGraph");
qmlRegisterUncreatableType<TestFlameGraphModel>(
"TestFlameGraphModel", 1, 0, "TestFlameGraphModel",
"QtCreator.TstTracingFlameGraphView", 1, 0, "TestFlameGraphModel",
QLatin1String("use the context property"));

View File

@@ -125,12 +125,12 @@ public:
{
setResizeMode(QQuickView::SizeRootObjectToView);
qmlRegisterType<TimelineRenderer>("TimelineRenderer", 1, 0, "TimelineRenderer");
qmlRegisterType<TimelineRenderer>("QtCreator.Tracing", 1, 0, "TimelineRenderer");
qmlRegisterType<TimelineOverviewRenderer>(
"TimelineOverviewRenderer", 1, 0, "TimelineOverviewRenderer");
qmlRegisterAnonymousType<TimelineZoomControl>("TimelineZoomControl", 1);
qmlRegisterAnonymousType<TimelineModel>("TimelineModel", 1);
qmlRegisterAnonymousType<TimelineNotesModel>("TimelineNotesModel", 1);
"QtCreator.Tracing", 1, 0, "TimelineOverviewRenderer");
qmlRegisterAnonymousType<TimelineZoomControl>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<TimelineModel>("QtCreator.Tracing", 1);
qmlRegisterAnonymousType<TimelineNotesModel>("QtCreator.Tracing", 1);
TimelineTheme::setupTheme(engine());
TimeFormatter::setupTimeFormatter();