forked from qt-creator/qt-creator
Tracing/Qml|PerfProfiler/CtfVisualizer: Move QML modules to :/qt/qml
We don't want to dedicate the whole resource file system to QML. Change-Id: I4c7e4af7aeeab00f44c5244e99949a90abb032cf Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
committed by
Ulf Hermann
parent
24c6073196
commit
8cb1775ba8
@@ -34,7 +34,7 @@
|
||||
#include <tracing/timelinetheme.h>
|
||||
|
||||
#include <QQmlContext>
|
||||
|
||||
#include <QQmlEngine>
|
||||
|
||||
namespace CtfVisualizer {
|
||||
namespace Internal {
|
||||
@@ -49,13 +49,14 @@ CtfVisualizerTraceView::CtfVisualizerTraceView(QWidget *parent, CtfVisualizerToo
|
||||
// Minimum height: 5 rows of 20 pixels + scrollbar of 50 pixels + 20 pixels margin
|
||||
setMinimumHeight(170);
|
||||
|
||||
engine()->addImportPath(":/qt/qml/");
|
||||
Timeline::TimelineTheme::setupTheme(engine());
|
||||
|
||||
rootContext()->setContextProperty(QLatin1String("timelineModelAggregator"),
|
||||
tool->modelAggregator());
|
||||
rootContext()->setContextProperty(QLatin1String("zoomControl"),
|
||||
tool->zoomControl());
|
||||
setSource(QUrl(QLatin1String("qrc:/QtCreator/Tracing/MainView.qml")));
|
||||
setSource(QUrl(QLatin1String("qrc:/qt/qml/QtCreator/Tracing/MainView.qml")));
|
||||
|
||||
// Avoid ugly warnings when reading from null properties in QML.
|
||||
connect(tool->modelAggregator(), &QObject::destroyed, this, [this]{ setSource(QUrl()); });
|
||||
|
||||
Reference in New Issue
Block a user