mirror of
https://github.com/yse/easy_profiler.git
synced 2025-01-14 08:37:55 +08:00
(GUI) Fixed displaying unicode text in popup and at histogram window
This commit is contained in:
parent
35ca4ff370
commit
bf308dc299
@ -1508,7 +1508,7 @@ void EasyGraphicsView::onIdleTimeout()
|
|||||||
if (itemDesc.type() == ::profiler::BLOCK_TYPE_BLOCK)
|
if (itemDesc.type() == ::profiler::BLOCK_TYPE_BLOCK)
|
||||||
{
|
{
|
||||||
//lay->addWidget(new QLabel("Name:", widget), row, 0, Qt::AlignRight);
|
//lay->addWidget(new QLabel("Name:", widget), row, 0, Qt::AlignRight);
|
||||||
lay->addWidget(new EasyBoldLabel(name, widget), row, 0, 1, 5, Qt::AlignHCenter);
|
lay->addWidget(new EasyBoldLabel(::profiler_gui::toUnicode(name), widget), row, 0, 1, 5, Qt::AlignHCenter);
|
||||||
++row;
|
++row;
|
||||||
|
|
||||||
const auto duration = itemBlock.node->duration();
|
const auto duration = itemBlock.node->duration();
|
||||||
@ -1532,7 +1532,7 @@ void EasyGraphicsView::onIdleTimeout()
|
|||||||
++row;
|
++row;
|
||||||
|
|
||||||
lay->addWidget(new QLabel("Name:", widget), row, 0, Qt::AlignRight);
|
lay->addWidget(new QLabel("Name:", widget), row, 0, Qt::AlignRight);
|
||||||
lay->addWidget(new QLabel(name, widget), row, 1, Qt::AlignLeft);
|
lay->addWidget(new QLabel(::profiler_gui::toUnicode(name), widget), row, 1, Qt::AlignLeft);
|
||||||
++row;
|
++row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -755,19 +755,19 @@ void EasyHistogramItem::paintById(QPainter* _painter)
|
|||||||
const auto name = *item->tree.node->name() != 0 ? item->tree.node->name() : easyDescriptor(item->tree.node->id()).name();
|
const auto name = *item->tree.node->name() != 0 ? item->tree.node->name() : easyDescriptor(item->tree.node->id()).name();
|
||||||
if (item->tree.per_thread_stats != nullptr)
|
if (item->tree.per_thread_stats != nullptr)
|
||||||
{
|
{
|
||||||
_painter->drawText(rect, Qt::AlignHCenter | Qt::TextDontClip, QString("%1 | %2 | %3 calls | %4% of thread profiled time").arg(m_threadName).arg(name)
|
_painter->drawText(rect, Qt::AlignHCenter | Qt::TextDontClip, QString("%1 | %2 | %3 calls | %4% of thread profiled time").arg(m_threadName).arg(::profiler_gui::toUnicode(name))
|
||||||
.arg(item->tree.per_thread_stats->calls_number)
|
.arg(item->tree.per_thread_stats->calls_number)
|
||||||
.arg(m_threadProfiledTime ? QString::number(100. * (double)item->tree.per_thread_stats->total_duration / (double)m_threadProfiledTime, 'f', 2) : QString("100")));
|
.arg(m_threadProfiledTime ? QString::number(100. * (double)item->tree.per_thread_stats->total_duration / (double)m_threadProfiledTime, 'f', 2) : QString("100")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_painter->drawText(rect, Qt::AlignHCenter | Qt::TextDontClip, QString("%1 | %2 | %3 calls").arg(m_threadName).arg(name)
|
_painter->drawText(rect, Qt::AlignHCenter | Qt::TextDontClip, QString("%1 | %2 | %3 calls").arg(m_threadName).arg(::profiler_gui::toUnicode(name))
|
||||||
.arg(m_selectedBlocks.size()));
|
.arg(m_selectedBlocks.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_painter->drawText(rect, Qt::AlignHCenter | Qt::TextDontClip, QString("%1 | %2 | %3 calls").arg(m_threadName).arg(easyDescriptor(m_blockId).name())
|
_painter->drawText(rect, Qt::AlignHCenter | Qt::TextDontClip, QString("%1 | %2 | %3 calls").arg(m_threadName).arg(::profiler_gui::toUnicode(easyDescriptor(m_blockId).name()))
|
||||||
.arg(m_selectedBlocks.size()));
|
.arg(m_selectedBlocks.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user