forked from qt-creator/qt-creator
Tracing: Add qml, register types via qt_add_qml_module
Use the CMake-based qml API to create the "QtCreator.Tracing" module. This uses qt_add_qml_module, which was introduced with Qt 6.2. For Qt 6.1 and below, everything compiles and runs like before this change. Change-Id: I4d63f9f724d0628cfaab9d1164c0d575f15d15aa Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -46,7 +46,9 @@ FlameGraphView::FlameGraphView(QmlProfilerModelManager *manager, QWidget *parent
|
||||
setObjectName("QmlProfiler.FlameGraph.Dock");
|
||||
setWindowTitle(tr("Flame Graph"));
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0)
|
||||
qmlRegisterType<FlameGraph::FlameGraph>("QtCreator.Tracing", 1, 0, "FlameGraph");
|
||||
#endif // Qt < 6.2
|
||||
qmlRegisterUncreatableType<FlameGraphModel>("QtCreator.QmlProfiler", 1, 0,
|
||||
"QmlProfilerFlameGraphModel",
|
||||
QLatin1String("use the context property"));
|
||||
|
||||
Reference in New Issue
Block a user