forked from qt-creator/qt-creator
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:
@@ -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));
|
||||
}
|
||||
|
@@ -518,7 +518,7 @@ void PerfTimelineModel::finalize()
|
||||
|
||||
m_locationOrder.resize(m_locationStats.size());
|
||||
|
||||
QMultiHash<int, LocationStats>::ConstIterator iter = m_locationStats.constBegin();
|
||||
QHash<int, LocationStats>::ConstIterator iter = m_locationStats.constBegin();
|
||||
int i = 0;
|
||||
for (; iter != m_locationStats.constEnd(); ++iter)
|
||||
m_locationOrder[i++] = iter.key();
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user