PerfProfiler: Some compile fixes with Qt6

Task-number: QTCREATORBUG-24098
Change-Id: I9d3260034051dd15e7d5892e3300f5f719bdf5ca
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
hjk
2020-08-20 10:45:06 +02:00
parent 0cdd07e06e
commit c6818c62f1
3 changed files with 4 additions and 4 deletions

View File

@@ -62,14 +62,14 @@ template<typename Counter>
static void fill(Counter &counter, const typename Counter::Container &container, bool fragmented)
{
qint64 allocated = 0;
QHash<void *, int> allocations;
QMultiHash<void *, int> 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<quintptr>(alloc));
QCOMPARE(counter.currentTotal(), allocated);
}