From 67a638de52ef9b0f38512d3af3827c73aa298fff Mon Sep 17 00:00:00 2001 From: Camila Date: Wed, 7 Apr 2021 14:08:13 +0200 Subject: [PATCH] Remove unnecessary local variable. Signed-off-by: Camila --- src/gui/userstatus.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gui/userstatus.cpp b/src/gui/userstatus.cpp index d550e46e0da6e..748e7706b7411 100644 --- a/src/gui/userstatus.cpp +++ b/src/gui/userstatus.cpp @@ -90,11 +90,9 @@ void UserStatus::slotFetchUserStatusFinished(const QJsonDocument &json, int stat const auto retrievedData = json.object().value("ocs").toObject().value("data").toObject(defaultValues); const auto emoji = retrievedData.value("icon").toString(); const auto message = retrievedData.value("message").toString(); - auto statusString = retrievedData.value("status").toString(); - - _status = stringToEnum(statusString); - statusString = enumToString(_status); - const auto visibleStatusText = message.isEmpty() ? statusString : message; + + _status = stringToEnum(retrievedData.value("status").toString()); + const auto visibleStatusText = message.isEmpty() ? enumToString(_status) : message; _message = QString("%1 %2").arg(emoji, visibleStatusText); emit fetchUserStatusFinished();