[network/ruqola] src/widgets/servererrorinfohistory: accountInfoStr was never used => assign directly to accountName

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 2b3d3e44446e7d3a415c618b0b6b53462a5a96c2 by Laurent Montel.
Committed on 13/08/2026 at 16:38.
Pushed by mlaurent into branch 'master'.

accountInfoStr was never used => assign directly to accountName

M  +2    -3    src/widgets/servererrorinfohistory/servererrorinfohistorydelegate.cpp

https://invent.kde.org/network/ruqola/-/commit/2b3d3e44446e7d3a415c618b0b6b53462a5a96c2

diff --git a/src/widgets/servererrorinfohistory/servererrorinfohistorydelegate.cpp b/src/widgets/servererrorinfohistory/servererrorinfohistorydelegate.cpp
index 604f349e49..a6c16d8a4f 100644
--- a/src/widgets/servererrorinfohistory/servererrorinfohistorydelegate.cpp
+++ b/src/widgets/servererrorinfohistory/servererrorinfohistorydelegate.cpp
@@ -33,11 +33,10 @@ void ServerErrorInfoHistoryDelegate::drawAccountInfo(QPainter *painter, const QM
     const QPen origPen = painter->pen();
     const qreal margin = MessageDelegateUtils::basicMargin();
     const QString accountName = index.data(ServerErrorInfoHistoryModel::AccountName).toString();
-    const QString accountInfoStr = accountName;
-    const QSize infoSize = option.fontMetrics.size(Qt::TextSingleLine, accountInfoStr);
+    const QSize infoSize = option.fontMetrics.size(Qt::TextSingleLine, accountName);
     const QRect infoAreaRect(option.rect.x(), option.rect.y(), option.rect.width(), infoSize.height()); // the whole row
     const QRect infoTextRect = QStyle::alignedRect(Qt::LayoutDirectionAuto, Qt::AlignCenter, infoSize, infoAreaRect);
-    painter->drawText(infoTextRect, accountInfoStr);
+    painter->drawText(infoTextRect, accountName);
     const int lineY = (infoAreaRect.top() + infoAreaRect.bottom()) / 2;
     QColor lightColor(painter->pen().color());
     lightColor.setAlpha(60);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.