diff --git a/src/gui/filedetails/shareemodel.cpp b/src/gui/filedetails/shareemodel.cpp index c4be699a7a..6f4fd97a6a 100644 --- a/src/gui/filedetails/shareemodel.cpp +++ b/src/gui/filedetails/shareemodel.cpp @@ -72,10 +72,10 @@ QVariant ShareeModel::data(const QModelIndex &index, const int role) const return QString(sharee->displayName() + " (" + sharee->shareWith() + ")"); case ShareeRole: return QVariant::fromValue(sharee); - default: - qCWarning(lcShareeModel) << "Got unknown role -- returning null value."; - return {}; } + + qCWarning(lcShareeModel) << "Got unknown role" << role << "returning null value."; + return {}; } // --------------------------- QPROPERTY methods --------------------------- // diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index cb511f038d..7eb3c0c0ab 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -115,8 +115,6 @@ QVariant ShareModel::data(const QModelIndex &index, const int role) const const auto startOfExpireDayUTC = linkShare->getExpireDate().startOfDay(QTimeZone::utc()); return startOfExpireDayUTC.toMSecsSinceEpoch(); } - default: - break; } } else if (const auto userGroupShare = share.objectCast()) { @@ -132,8 +130,6 @@ QVariant ShareModel::data(const QModelIndex &index, const int role) const const auto startOfExpireDayUTC = userGroupShare->getExpireDate().startOfDay(QTimeZone::utc()); return startOfExpireDayUTC.toMSecsSinceEpoch(); } - default: - break; } } @@ -178,12 +174,12 @@ QVariant ShareModel::data(const QModelIndex &index, const int role) const case NoteRole: case ExpireDateRole: return {}; - default: - qCWarning(lcShareModel) << "Got unknown role" << role - << "for share of type" << share->getShareType() - << "so returning null value."; - return {}; } + + qCWarning(lcShareModel) << "Got unknown role" << role + << "for share of type" << share->getShareType() + << "so returning null value."; + return {}; } // ---------------------- Internal model data methods ---------------------- //