<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/120201/">https://git.reviewboard.kde.org/r/120201/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/120201/diff/1/?file=312208#file312208line176" style="color: black; font-weight: bold; text-decoration: underline;">clangsupport.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QPair<TopDUContextPointer, KTextEditor::Range> importedContextForPosition(const KUrl& url, const KTextEditor::Cursor& position)</pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QPair<TopDUContextPointer, KTextEditor::Range> importedContextForPosition(const QUrl &url, const KTextEditor::Cursor& position)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">176</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KUrl</span> <span class="n">dir</span><span class="p">(</span><span class="n">url</span><span class="p">.</span><span class="n">directory</span><span class="p">());</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">176</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="k">auto</span> <span class="n">options</span> <span class="o">=</span> <span class="n">QUrl</span><span class="o">::</span><span class="n">PreferLocalFile</span> <span class="o">|</span> <span class="n">QUrl</span><span class="o">::</span><span class="n">StripTrailingSlash</span> <span class="o">|</span> <span class="n">QUrl</span><span class="o">::</span><span class="n">NormalizePathSegments</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">this looks wrong. you want to add one path to the other, right? Use QUrl(includeName) to make it a relative URL. And the dir you should get via</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">const</span> QUrl dir <span style="color: #666666">=</span> url.adjusted(QUrl<span style="color: #666666">::</span>RemoveFilename);
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">the includeName you should then get via</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">includeName <span style="color: #666666">=</span> dir.resolved(QUrl(includeName)).toLocalFile();
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Add some normalization for good measure :) If you think thats ugly, use Path instead:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">const</span> Path dir <span style="color: #666666">=</span> Path(url).parent();
includeName <span style="color: #666666">=</span> Path(dir, includeName).toLocalFile()
</pre></div>
</p></pre>
</div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/120201/diff/1/?file=312217#file312217line40" style="color: black; font-weight: bold; text-decoration: underline;">duchain/clangducontext.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">REGISTER_DUCHAIN_ITEM_WITH_DATA(ClangNormalDUContext, DUContextData);</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">40</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n"><span class="hl">K</span>Url</span> <span class="n">u</span><span class="p">(</span><span class="n">url</span><span class="p">().</span><span class="n"><span class="hl">str</span></span><span class="p">());</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">40</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n"><span class="hl">Q</span>Url</span> <span class="n">u</span><span class="p">(</span><span class="n">url</span><span class="p">().</span><span class="n"><span class="hl">toUrl</span></span><span class="p">());</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">const QUrl u = url().toUrl();</p></pre>
</div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/120201/diff/1/?file=312218#file312218line132" style="color: black; font-weight: bold; text-decoration: underline;">duchain/macronavigationcontext.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QString MacroNavigationContext::html(bool shorten)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="n">QString</span> <span class="n">path</span> <span class="o">=</span> <span class="n">url</span><span class="p">.</span><span class="n"><span class="hl">pathOr</span>Url</span><span class="p"><span class="hl">(</span>);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="n">QString</span> <span class="n">path</span> <span class="o">=</span> <span class="n">url</span><span class="p">.</span><span class="n"><span class="hl">url</span></span><span class="p"><span class="hl">(</span></span><span class="n"><span class="hl">Q</span>Url</span><span class="o"><span class="hl">::</span></span><span class="n"><span class="hl">PreferLocalFile</span></span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">.toLocalFile()</p></pre>
</div>
</div>
<br />
<p>- Milian Wolff</p>
<br />
<p>On September 14th, 2014, 2:42 p.m. UTC, Olivier Jean de Gaalon wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDevelop, Kevin Funk and Milian Wolff.</div>
<div>By Olivier Jean de Gaalon.</div>
<p style="color: grey;"><i>Updated Sept. 14, 2014, 2:42 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-clang
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Port KUrl to QUrl/Adjust to platform changes</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Tests run, failures don't seem related.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>documentfinderhelpers.cpp <span style="color: grey">(fc6d92d)</span></li>
<li>duchain/clangducontext.cpp <span style="color: grey">(488a54f)</span></li>
<li>duchain/macronavigationcontext.cpp <span style="color: grey">(447e4ff)</span></li>
<li>duchain/parsesession.h <span style="color: grey">(8e653c4)</span></li>
<li>tests/test_assistants.cpp <span style="color: grey">(f1fe2c5)</span></li>
<li>tests/test_buddies.h <span style="color: grey">(1c6f8f3)</span></li>
<li>tests/test_buddies.cpp <span style="color: grey">(36eb52a)</span></li>
<li>tests/test_problems.cpp <span style="color: grey">(376734d)</span></li>
<li>codegen/clangsignatureassistant.cpp <span style="color: grey">(6f1ad52)</span></li>
<li>documentfinderhelpers.h <span style="color: grey">(0672732)</span></li>
<li>codecompletion/model.cpp <span style="color: grey">(b31e856)</span></li>
<li>codegen/adaptsignatureassistant.h <span style="color: grey">(59968a5)</span></li>
<li>codegen/adaptsignatureassistant.cpp <span style="color: grey">(4ef1642)</span></li>
<li>codegen/clangsignatureassistant.h <span style="color: grey">(b83a0a7)</span></li>
<li>CMakeLists.txt <span style="color: grey">(cd32351)</span></li>
<li>clangsupport.h <span style="color: grey">(b76af87)</span></li>
<li>clangsupport.cpp <span style="color: grey">(71589b7)</span></li>
<li>codecompletion/model.h <span style="color: grey">(24a5c82)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/120201/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>