<table><tr><td style="">leinir marked 5 inline comments as done.<br />leinir added a comment.
</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/D27544">View Revision</a></tr></table><br /><div><div><p>Thanks for those, <a href="https://phabricator.kde.org/p/ahiemstra/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@ahiemstra</a>, good stuff there :)</p></div></div><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/D27544#inline-159205">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ahiemstra</span> wrote in <span style="color: #4b4d51; font-weight: bold;">engine.cpp:614</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Code style: & attaches to the name, not the type. (Yes I hate it too).</p>
<p style="padding: 0; margin: 8px;">There's a few instances of this around.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">so nasty... right, thanks for pointing those out, it feels so wrong to type :P</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/D27544#inline-159207">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ahiemstra</span> wrote in <span style="color: #4b4d51; font-weight: bold;">engine.cpp:631</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">This object will linger until the engine is destroyed, which seems like a suboptimal thing. Maybe better to do:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">auto question = std::make_unique<Question>(Question::SelectFromListQuestion);</pre></div>
<p style="padding: 0; margin: 8px;">then it will be automatically cleaned up once you exit the scope.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Hmm... That's something that'll want doing in a fair few places i think (including the documentation for Question) - but yup, might as well start somewhere :) It does mean turning on C++14 for KNewStuff, which... should be fine?</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/D27544#inline-159203">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ahiemstra</span> wrote in <span style="color: #4b4d51; font-weight: bold;">engine.cpp:644</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">You may want to log something in the else here, at least then it will be possible to figure out why an update is not happening.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">That's probably a good idea, yes... It'll commonly be due to the user cancelling the dialog, but if there's no good questionasker registered, it may happen anyway - plus i guess it's just good style anyway :)</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/D27544#inline-159199">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ahiemstra</span> wrote in <span style="color: #4b4d51; font-weight: bold;">EntryDetails.qml:101</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">That "1" here is a bit mysterious, what does it actually mean?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">It's that whole one-indexed list thing that OCS has... But yup, your idea below sounds pretty good.</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/D27544#inline-159201">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ahiemstra</span> wrote in <span style="color: #4b4d51; font-weight: bold;">quickitemsmodel.h:154</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Rather than using -1, you could add an enum that defines these values a bit more, like:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">enum LinkId {
AutoDetectLink = -1,
FirstItem = 1
}</pre></div>
<p style="padding: 0; margin: 8px;">You can then also expose that to QML to avoid the magical 1 up there.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">A good call, less magic numbers are always good. Did feel a little... unpleasant to add those.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R304 KNewStuff</div></div></div><br /><div><strong>BRANCH</strong><div><div>fix-update (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27544">https://phabricator.kde.org/D27544</a></div></div><br /><div><strong>To: </strong>leinir, KNewStuff, Frameworks, Plasma, ngraham, apol, Discover Software Store<br /><strong>Cc: </strong>ahiemstra, alexde, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns<br /></div>