Commit d0e16b83 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

smb: do not hide enum warnings via switch default label

Summary:
should we ever extend the url types the compiler will not warn us that
the new type may need handling. instead return when we have handled
a type so the fallback can be moved after the switch

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D27644
parent 41397521
......@@ -165,7 +165,9 @@ void SMBSlave::stat( const QUrl& kurl )
case SMBURLTYPE_ENTIRE_NETWORK:
case SMBURLTYPE_WORKGROUP_OR_SERVER:
udsentry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
break;
statEntry(udsentry);
finished();
return;
case SMBURLTYPE_SHARE_OR_PATH:
{
......@@ -198,15 +200,14 @@ void SMBSlave::stat( const QUrl& kurl )
reportError(url, ret);
return;
}
break;
statEntry(udsentry);
finished();
return;
}
default:
qCDebug(KIO_SMB_LOG) << "UNKNOWN " << url;
finished();
return;
}
statEntry(udsentry);
qCDebug(KIO_SMB_LOG) << "UNKNOWN " << url;
finished();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment