<table><tr><td style="">vkorneev 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/D14931">View Revision</a></tr></table><br /><div><div><p>Hi <a href="https://phabricator.kde.org/p/aaronpuchert/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@aaronpuchert</a>, thank you for comment.<br />
I was in doubt between these two variants while writing the code and stopped on current one for two reasons:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Looking at QT source code, <tt style="background: #ebebeb; font-size: 13px;">reset()</tt> is ultimately reduced to <tt style="background: #ebebeb; font-size: 13px;">QSharedPointer copy(t); swap(copy);</tt> anyways. And QSharedPointer has move constructor, so it'll work in this case (right?).</li>
<li class="remarkup-list-item">Current variant better expresses my intentions (that's subjective).</li>
</ul>
<p>But if you still think that we should use <tt style="background: #ebebeb; font-size: 13px;">reset()</tt> I'd change it in a moment. What do you think?</p>
<p>P.S. Sorry for that nit-picking. I'm still just learning, so I have a time and desire to make these long investigations about whether it's better to use reset or assignment, shared pointers or raw pointers, etc. I think that'll pass after a few more patches XD</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14931">https://phabricator.kde.org/D14931</a></div></div><br /><div><strong>To: </strong>vkorneev, KDevelop<br /><strong>Cc: </strong>aaronpuchert, kfunk, pino, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>