<table><tr><td style="">dhaumann 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/D21287">View Revision</a></tr></table><br /><div><div><p>Looking at the screenshots, I find it rather intransparent which document gets what name, besides that the quick open already shows the path to distinguish the files -> is this really an improvement?</p>
<p>And: I have the feeling this patch should pay attention to performance. Sometimes, users have hundreds of files open, and this should not slow down any open operation.</p>
<p>Since I am not yet convinced by this path: -1 right now...</p>
<p>Any comments? :-)</p>
<p>PS: The tab switcher also has something similar to make a distiction between files with the same name <a href="https://phabricator.kde.org/D16054" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: line-through;">D16054</a></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/D21287#inline-119445">View Inline</a><span style="color: #4b4d51; font-weight: bold;">katedocument.cpp:4229</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: rgba(151, 234, 151, .6);"> <span class="n">QString</span> <span class="n">fullUrl</span> <span style="color: #aa2211">=</span> <span class="n">removeNewLines</span><span class="p">(</span><span class="n">url</span><span class="p">.</span><span class="n">url</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">missing const.</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/D21287#inline-119444">View Inline</a><span style="color: #4b4d51; font-weight: bold;">katedocument.cpp:4235</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: rgba(151, 234, 151, .6);"> <span class="n">QStringList</span> <span class="n">splittedUrl</span> <span style="color: #aa2211">=</span> <span class="n">fullUrl</span><span class="p">.</span><span class="n">split</span><span class="p">(</span><span class="n">QLatin1Char</span><span class="p">(</span><span style="color: #766510">'/'</span><span class="p">),</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">SkipEmptyParts</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Could you use QString::splitRef() to avoid not needed QString allocations? You will get a QVector<QStringRef> instead of a QStringList.</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/D21287#inline-119446">View Inline</a><span style="color: #4b4d51; font-weight: bold;">katedocument.cpp:4240</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: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// ...to avoid odd naming in rare cases we force numbering fallback</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">splittedUrl</span><span class="p">.</span><span class="n">at</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">)</span> <span style="color: #aa2211">==</span> <span class="n">QLatin1String</span><span class="p">(</span><span style="color: #766510">"file:"</span><span class="p">))</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">splittedUrl</span><span class="p">.</span><span class="n">removeAt</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I wonder how this behaves on Windows :-)</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/D21287#inline-119447">View Inline</a><span style="color: #4b4d51; font-weight: bold;">katedocument.cpp:4242</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: rgba(151, 234, 151, .6);"> <span class="n">splittedUrl</span><span class="p">.</span><span class="n">removeAt</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">splittedUrl</span><span class="p">.</span><span class="n">at</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">)</span> <span style="color: #aa2211">==</span> <span class="n">QLatin1String</span><span class="p">(</span><span style="color: #766510">"home"</span><span class="p">))</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">splittedUrl</span><span class="p">.</span><span class="n">removeAt</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Same here: Windows?</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/D21287#inline-119448">View Inline</a><span style="color: #4b4d51; font-weight: bold;">katedocument.cpp:4273</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: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// Collect all files with same name...</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">typedef</span> <span class="n">QPair</span><span style="color: #aa2211"><</span><span class="n">KTextEditor</span><span style="color: #aa2211">::</span><span class="n">DocumentPrivate</span><span style="color: #aa2211">*</span><span class="p">,</span> <span class="n">QStringList</span><span style="color: #aa2211">></span> <span class="n">FooPair</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QList</span><span style="color: #aa2211"><</span><span class="n">FooPair</span><span style="color: #aa2211">></span> <span class="n">fooList</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">FooPair? ...</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21287">https://phabricator.kde.org/D21287</a></div></div><br /><div><strong>To: </strong>loh.tar, KTextEditor<br /><strong>Cc: </strong>dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, KTextEditor, domson, michaelh, ngraham, bruns, demsking, sars<br /></div>