mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +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)
|
||||
{
|
||||
//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;
|
||||
|
||||
const auto duration = itemBlock.node->duration();
|
||||
@ -1532,7 +1532,7 @@ void EasyGraphicsView::onIdleTimeout()
|
||||
++row;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
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(m_threadProfiledTime ? QString::number(100. * (double)item->tree.per_thread_stats->total_duration / (double)m_threadProfiledTime, 'f', 2) : QString("100")));
|
||||
}
|
||||
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()));
|
||||
}
|
||||
}
|
||||
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()));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user