<table><tr><td style="">sitter added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D27153">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D27153#inline-154615">View Inline</a><span style="color: #4b4d51; font-weight: bold;">feverfew</span> wrote in <span style="color: #4b4d51; font-weight: bold;">kio_sftp.cpp:145</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Technically unrelated to your changes, but does this even work? isn't the check supposed to be against <tt style="background: #ebebeb; font-size: 13px;">errno</tt> in this case, not offset?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">True enough. I expect, like many things in the slaves, this never actually worked. that line was introduced as <tt style="background: #ebebeb; font-size: 13px;">KDE_lseek</tt> and that too was just an alias for lseek :|<br />
Also lseek doesn't even errno EAGAIN according to the manpage. I expect seeking as a whole needs fixing, I'll record a bug.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D27153#inline-154619">View Inline</a><span style="color: #4b4d51; font-weight: bold;">feverfew</span> wrote in <span style="color: #4b4d51; font-weight: bold;">kio_sftp.cpp:302</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">`if (result.success) { ...} else { ... } seems clearer to me</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">That function is a verbatim copy from ftp so I'd rather not change it.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D27153#inline-154620">View Inline</a><span style="color: #4b4d51; font-weight: bold;">feverfew</span> wrote in <span style="color: #4b4d51; font-weight: bold;">kio_sftp.cpp:328</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">I'm a bit confused, why is this necessary?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Kinda unrelated to the diff, I only changed it because this class has way too many type coercions.<br />
<tt style="background: #ebebeb; font-size: 13px;">i</tt> goes into <tt style="background: #ebebeb; font-size: 13px;">ssh_userauth_kbdint_getprompt</tt> which has an unsigned signature, the counter <tt style="background: #ebebeb; font-size: 13px;">n</tt> coming out of <tt style="background: #ebebeb; font-size: 13px;">ssh_userauth_kbdint_getnprompts</tt> is signed though. The explicit cast silences the warning of the type coercion between int and unsigned.</p>

<p style="padding: 0; margin: 8px;">Mind you, I think n<1 cannot even happen. The server challenged us, so there's always going to be at least one prompt, so the fact that it returns a signed prompt count is silly to begin with.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D27153#inline-154608">View Inline</a><span style="color: #4b4d51; font-weight: bold;">feverfew</span> wrote in <span style="color: #4b4d51; font-weight: bold;">kio_sftp.h:77</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">TODO KF6 <a href="https://en.cppreference.com/w/cpp/language/attributes/nodiscard" class="remarkup-link" target="_blank" rel="noreferrer">https://en.cppreference.com/w/cpp/language/attributes/nodiscard</a> ?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I guess, that applies to all slaves though. ftp already has it and smb is also going to get it at some point. If we want a todo comment I'd put it in the ftp code. Though TBH I think that should just be a clazy check or deprecation inside Qt when built with c++17.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R320 KIO Extras</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27153">https://phabricator.kde.org/D27153</a></div></div><br /><div><strong>To: </strong>sitter, dfaure, feverfew<br /><strong>Cc: </strong>kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov<br /></div>