[sftp] Use Q_ASSERT in sftpProtocol::reportError()
ClosedPublic

Authored by asn on Sep 21 2018, 1:14 PM.

Details

Reviewers
sitter
ngraham
Summary

BUG: 362988

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>

Diff Detail

Branch
arcpatch-D15656
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3174
Build 3192: arc lint + arc unit
asn requested review of this revision.Sep 21 2018, 1:14 PM
asn created this revision.
asn updated this revision to Diff 42241.Sep 24 2018, 1:03 PM

Fix BUG: in the commit message

asn edited the summary of this revision. (Show Details)Sep 24 2018, 1:04 PM
sitter accepted this revision.Oct 8 2018, 2:21 PM

I think we should change the signature of toKIOError to KIO::Error (int) const. 0 Is not a valid KIO::Error to begin with, so, asserting that the error is in fact not an invalid error seems like something the compiler could just do for us if we stopped treating the error as an int until we finally emit it via error().

That being said, the assert is fine in lieu of changing toKIOError.
I dislike the indentation variance of the base diff D15655 though.

This revision is now accepted and ready to land.Oct 8 2018, 2:21 PM