Skip to content
Snippets Groups Projects
Commit c3bbf389 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Make flame graph view compatible with Qt 5.4


Change-Id: I88495cb51f1f28e168290137930aaf949e83b4c5
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent f611403e
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Controls 1.3
import FlameGraph 1.0
import FlameGraphModel 1.0
......
......@@ -78,7 +78,7 @@ public:
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
QModelIndex parent(const QModelIndex &child) const override;
int rowCount(const QModelIndex &parent) const override;
Q_INVOKABLE int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent) const override;
QVariant data(const QModelIndex &index, int role) const override;
QHash<int, QByteArray> roleNames() const override;
......
......@@ -46,6 +46,8 @@ FlameGraphView::FlameGraphView(QWidget *parent, QmlProfiler::QmlProfilerModelMan
qmlRegisterType<FlameGraph>("FlameGraph", 1, 0, "FlameGraph");
qmlRegisterUncreatableType<FlameGraphModel>("FlameGraphModel", 1, 0, "FlameGraphModel",
QLatin1String("use the context property"));
qmlRegisterUncreatableType<QAbstractItemModel>("AbstractItemModel", 1, 0, "AbstractItemModel",
QLatin1String("only for Qt 5.4"));
m_content->rootContext()->setContextProperty(QStringLiteral("flameGraphModel"), m_model);
m_content->setSource(QUrl(QStringLiteral("qrc:/FlameGraphView.qml")));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment