From 2caa9ccfc6b9b169e0972e09c86b9cb80bedef20 Mon Sep 17 00:00:00 2001 From: Camila Date: Mon, 17 May 2021 17:10:12 +0200 Subject: [PATCH] Add Q_UNREACHABLE() after switch statements in UserStatus. Signed-off-by: Camila --- src/gui/userstatus.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/userstatus.cpp b/src/gui/userstatus.cpp index d7e025c4e..9d48c016e 100644 --- a/src/gui/userstatus.cpp +++ b/src/gui/userstatus.cpp @@ -56,9 +56,11 @@ namespace { case UserStatus::Status::Invisible: case UserStatus::Status::Offline: return QObject::tr("Offline"); - default: + case UserStatus::Status::Online: return QObject::tr("Online"); } + + Q_UNREACHABLE(); } } @@ -131,9 +133,11 @@ QUrl UserStatus::icon() const case Status::Invisible: case Status::Offline: return Theme::instance()->statusInvisibleImageSource(); - default: + case Status::Online: return Theme::instance()->statusOnlineImageSource(); } + + Q_UNREACHABLE(); } } // namespace OCC