perf: Fix all clazy qstring-allocation warnings (#903)

This commit is contained in:
Waqar Ahmed
2020-01-29 19:48:35 +01:00
committed by GitHub
parent 9d26104d2f
commit ecaf25ead6
85 changed files with 853 additions and 840 deletions
@@ -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,