From c6818c62f140c9c5f77141e0ada2930118d7e2d1 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 20 Aug 2020 10:45:06 +0200 Subject: [PATCH] PerfProfiler: Some compile fixes with Qt6 Task-number: QTCREATORBUG-24098 Change-Id: I9d3260034051dd15e7d5892e3300f5f719bdf5ca Reviewed-by: Ulf Hermann --- src/plugins/perfprofiler/perfdatareader.cpp | 2 +- src/plugins/perfprofiler/perftimelinemodel.cpp | 2 +- src/plugins/perfprofiler/tests/perfresourcecounter_test.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/perfprofiler/perfdatareader.cpp b/src/plugins/perfprofiler/perfdatareader.cpp index dfdbbb03421..88904f9a50a 100644 --- a/src/plugins/perfprofiler/perfdatareader.cpp +++ b/src/plugins/perfprofiler/perfdatareader.cpp @@ -408,7 +408,7 @@ QString PerfDataReader::findPerfParser() QString filePath = QString::fromLocal8Bit(qgetenv("PERFPROFILER_PARSER_FILEPATH")); if (filePath.isEmpty()) { filePath = QString::fromLatin1("%1/perfparser%2").arg(Core::ICore::libexecPath(), - QTC_HOST_EXE_SUFFIX); + QString(QTC_HOST_EXE_SUFFIX)); } return QDir::toNativeSeparators(QDir::cleanPath(filePath)); } diff --git a/src/plugins/perfprofiler/perftimelinemodel.cpp b/src/plugins/perfprofiler/perftimelinemodel.cpp index c16ff5d260e..234338ffe38 100644 --- a/src/plugins/perfprofiler/perftimelinemodel.cpp +++ b/src/plugins/perfprofiler/perftimelinemodel.cpp @@ -518,7 +518,7 @@ void PerfTimelineModel::finalize() m_locationOrder.resize(m_locationStats.size()); - QMultiHash::ConstIterator iter = m_locationStats.constBegin(); + QHash::ConstIterator iter = m_locationStats.constBegin(); int i = 0; for (; iter != m_locationStats.constEnd(); ++iter) m_locationOrder[i++] = iter.key(); diff --git a/src/plugins/perfprofiler/tests/perfresourcecounter_test.cpp b/src/plugins/perfprofiler/tests/perfresourcecounter_test.cpp index f242725c357..f48d6aec45c 100644 --- a/src/plugins/perfprofiler/tests/perfresourcecounter_test.cpp +++ b/src/plugins/perfprofiler/tests/perfresourcecounter_test.cpp @@ -62,14 +62,14 @@ template static void fill(Counter &counter, const typename Counter::Container &container, bool fragmented) { qint64 allocated = 0; - QHash allocations; + QMultiHash allocations; for (int i = 0; i < 100; ++i) { for (int j = 0; j < 100; ++j) { int amount = fragmented ? j : i; allocated += amount; counter.request(amount); void *alloc = malloc(amount); - allocations.insertMulti(alloc, amount); + allocations.insert(alloc, amount); counter.obtain(reinterpret_cast(alloc)); QCOMPARE(counter.currentTotal(), allocated); }