<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/128277/">https://git.reviewboard.kde.org/r/128277/</a>
</td>
</tr>
</table>
<br />
<p>
Ship it!
</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
<br />
<p>- David Faure</p>
<br />
<p>On June 23rd, 2016, 4:55 p.m. UTC, Rob Wu 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 KDE Frameworks.</div>
<div>By Rob Wu.</div>
<p style="color: grey;"><i>Updated June 23, 2016, 4:55 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</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;">Replace two isDir debug assertions with conditionals, because
there is no guarantee that the parameter is a directory.</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;">To test, I first configured ASAN by passing the following to cmake:
<code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">-DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=undefined"</code></p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KDirModel::index was tested as follows:</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%">make kdirmodeltest
ASAN_OPTIONS=detect_leaks=0 ./autotests/kdirmodeltest testIndex
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KDirModel::fetchMore is tested as follows (manually):</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Create <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">a.out</code> as follows:</li>
</ol>
<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: #408080; font-style: italic">// g++ `pkg-config --cflags --libs Qt5Widgets` main.cpp -fPIC -fsanitize=address</span>
<span style="color: #BC7A00">#include <QApplication></span>
<span style="color: #BC7A00">#include <QFileDialog></span>
<span style="color: #BC7A00">#include <QTemporaryDir></span>
<span style="color: #B00040">int</span> <span style="color: #0000FF">main</span>(<span style="color: #B00040">int</span> argc, <span style="color: #B00040">char</span> <span style="color: #666666">**</span>argv) {
QTemporaryDir tempDir;
QFile(tempDir.path() <span style="color: #666666">+</span> <span style="color: #BA2121">"/filename.tex"</span>).open(QIODevice<span style="color: #666666">::</span>WriteOnly);
QApplication app(argc, argv);
QStringList filesNames <span style="color: #666666">=</span> QFileDialog<span style="color: #666666">::</span>getOpenFileNames(
Q_NULLPTR, <span style="color: #BA2121">"Open File"</span>, tempDir.path(), <span style="color: #BA2121">"TeX files (*.tex)"</span>);
<span style="color: #008000; font-weight: bold">return</span> app.exec();
}
</pre></div>
</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Run it. In the file dialog, type "./".</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">A dropdown shows the files in the directory ("filename.tex").</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Press arrow down. Now the filename will be matched and NOTHING should happen.</li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Before this patch, step 4 would crash; This is a reduced test case based on
a crash when I tried to save my work in TexMaker's (Save As dialog).</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>autotests/kdirmodeltest.cpp <span style="color: grey">(1a14a01)</span></li>
<li>src/widgets/kdirmodel.cpp <span style="color: grey">(eab0121)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/128277/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>