diff options
author | hjk <hjk@qt.io> | 2020-02-19 10:13:33 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-02-25 10:43:10 +0000 |
commit | e5d1e9d2743a8cecc2f0ecb1df15ef7eadedf637 (patch) | |
tree | 80f674cfa44a9d0564bb3b2969d0477834ec7660 /src/plugins/qmlprofiler | |
parent | aeef7137a28cfa69ff0b8c45445c04ae8e354d7b (diff) |
Work around QHash::unite deprecation
Change-Id: Ibf199b5e3f2ca99b7e0cafe20893a509d9eab906
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/flamegraphmodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp index 5673f2fbc3..590932c1c4 100644 --- a/src/plugins/qmlprofiler/flamegraphmodel.cpp +++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp @@ -312,7 +312,7 @@ QVariant FlameGraphModel::data(const QModelIndex &index, int role) const QHash<int, QByteArray> FlameGraphModel::roleNames() const { - static QHash<int, QByteArray> extraRoles{ + static const QHash<int, QByteArray> extraRoles{ {TypeIdRole, "typeId"}, {TypeRole, "type"}, {DurationRole, "duration"}, @@ -328,7 +328,9 @@ QHash<int, QByteArray> FlameGraphModel::roleNames() const {AllocationsRole, "allocations" }, {MemoryRole, "memory" } }; - return QAbstractItemModel::roleNames().unite(extraRoles); + QHash<int, QByteArray> roles = QAbstractItemModel::roleNames(); + Utils::addToHash(&roles, extraRoles); + return roles; } QmlProfilerModelManager *FlameGraphModel::modelManager() const |