perf: Fix all clazy qstring-allocation warnings (#903)
This commit is contained in:
@@ -607,7 +607,8 @@ void QtGraphNode::setStyle(const GraphViewStyle::NodeStyle& style)
|
||||
m_matchText->setPos(
|
||||
style.iconOffset.x + style.iconSize + style.textOffset.x, style.textOffset.y);
|
||||
|
||||
float charWidth = QFontMetrics(font).width("QtGraphNode::QtGraphNode::QtGraphNode") / 37.0f;
|
||||
float charWidth = QFontMetrics(font).width(
|
||||
QStringLiteral("QtGraphNode::QtGraphNode::QtGraphNode")) / 37.0f;
|
||||
float charHeight = QFontMetrics(font).height();
|
||||
m_matchRect->setRect(
|
||||
style.iconOffset.x + style.iconSize + style.textOffset.x + m_matchPos * charWidth,
|
||||
|
||||
Reference in New Issue
Block a user