<table><tr><td style="">mwolff requested changes to this revision.<br />mwolff added inline comments.<br />This revision now requires changes to proceed.
</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/D4772" rel="noreferrer">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/D4772#inline-20060" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:4</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "><span style="color: #74777d">   Copyright 2007 Andreas Pakulat <apaku@gmx.de></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d">   Copyright 2016, 2017 Alexander Potashev <aspotashev@gmail.com></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">only 2017, or did you work on this in 2016 already?</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/D4772#inline-20062" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:686</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #aa4000">struct</span> <span class="n">TaskInfo</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">this name is too generic, it's only for copy'n'paste, right? Maybe call it CopyAndPasteTaskInfo? I'd also welcome if you could move this to a separate file, along with the <tt style="background: #ebebeb; font-size: 13px;">create*Widget</tt> helpers</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/D4772#inline-20063" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:712</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">Path</span> <span class="n">m_dest</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">};</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">mark this as <tt style="background: #ebebeb; font-size: 13px;">Q_DECLARE_TYPEINFO(..., Q_MOVABLE_TYPE);</tt> use QVector instead of QList below</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/D4772#inline-20064" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:724</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #aa4000">return</span> <span class="n">TaskInfo</span><span class="p">(</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span class="n">ok</span> <span style="color: #aa2211">?</span> <span class="n">TaskStatus</span><span style="color: #aa2211">::</span><span style="color: #a0a000">SUCCESS</span> <span class="p">:</span> <span class="n">TaskStatus</span><span style="color: #aa2211">::</span><span class="n">FAILURE</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">join with next line</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/D4772#inline-20065" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:731</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #aa4000">return</span> <span class="n">TaskInfo</span><span class="p">(</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span class="n">ok</span> <span style="color: #aa2211">?</span> <span class="n">TaskStatus</span><span style="color: #aa2211">::</span><span style="color: #a0a000">SUCCESS</span> <span class="p">:</span> <span class="n">TaskStatus</span><span style="color: #aa2211">::</span><span class="n">FAILURE</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">dito</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/D4772#inline-20066" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:738</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #aa4000">return</span> <span class="n">TaskInfo</span><span class="p">(</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span class="n">ok</span> <span style="color: #aa2211">?</span> <span class="n">TaskStatus</span><span style="color: #aa2211">::</span><span style="color: #a0a000">SUCCESS</span> <span class="p">:</span> <span class="n">TaskStatus</span><span style="color: #aa2211">::</span><span class="n">FAILURE</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">dito</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/D4772#inline-20067" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:823</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">QDialog</span><span style="color: #aa2211">*</span> <span class="n">dialog</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">QDialog</span><span class="p">(</span><span class="n">parent</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I'd welcome if you could move the ui setup stuff into a <tt style="background: #ebebeb; font-size: 13px;">.ui</tt> file created with designer</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/D4772#inline-20070" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:914</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;">    <span class="bright">        </span><span style="color: #74777d"><span class="bright">//expand target</span> fol<span class="bright">der</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;">    <span class="bright">        </span><span class="n"><span class="bright">viewCtx</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">view</span></span><span class="bright"></span><span class="p"><span class="bright">()</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">expandItem</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">destItem</span></span><span class="bright"></span><span class="p"><span class="bright">);</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="bright"></span><span style="color: #74777d"><span class="bright">// For example you are moving the</span> fol<span class="bright">lowing items into /dest/</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="bright"></span><span style="color: #74777d"><span class="bright">//   * /tests/</span></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">could you move this stuff into separate helper functions? this looks like multiple steps, and readability would be improved if each step would be its own function</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/D4772#inline-20068" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:937</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #74777d">// file already exists and a replacing copy/move fails.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">QMap</span><span style="color: #aa2211"><</span><span class="n">Path</span><span class="p">,</span> <span class="n">Path</span><span style="color: #aa2211">::</span><span class="n">List</span><span style="color: #aa2211">></span> <span class="n">finalPaths</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">does this need to be sorted? if not, use QHash</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/D4772#inline-20069" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:956</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #74777d">// Items originating from projects open in this KDevelop session</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">QMap</span><span style="color: #aa2211"><</span><span class="n">IProject</span><span style="color: #aa2211">*</span><span class="p">,</span> <span class="n">QList</span><span style="color: #aa2211"><</span><span class="n">KDevelop</span><span style="color: #aa2211">::</span><span class="n">ProjectBaseItem</span><span style="color: #aa2211">*>></span> <span class="n">itemsPerProject</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #74777d">// Items that do not belong to known projects</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">again, QHash</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/D4772#inline-20071" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">projectmanagerviewplugin.cpp:1060</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #74777d">// If there was a single failure, display a warning dialog.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">std</span><span style="color: #aa2211">::</span><span class="n">any_of</span><span class="p">(</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">            <span class="n">tasks</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span> <span class="n">tasks</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">de-inline for readability, join next line, i.e.:</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);">const bool anyFailed = std::any_of(tasks.begin(), tasks.end(),
                                   [](){ ... };
if (anyFailed) {
    ...
}</pre></div></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R33 KDevPlatform</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4772" rel="noreferrer">https://phabricator.kde.org/D4772</a></div></div><br /><div><strong>To: </strong>aspotashev, kfunk, mwolff<br /><strong>Cc: </strong>kdevelop-devel<br /></div>