<table><tr><td style="">elvisangelaccio created this revision.<br />elvisangelaccio added reviewers: dfaure, graesslin.<br />elvisangelaccio set the repository for this revision to rPLASMAINTEGRATION Integration for Qt applications in Plasma.<br />elvisangelaccio added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.</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/D2365" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>As discussed in <a href="https://phabricator.kde.org/D1813" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D1813</a>, I'm trying to understand how exactly the filters are handled and where the actual problem is. For now I've come up with this failing test case, which looks like this:</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);">FAIL! : KFileDialog_UnitTest::testSelectedNameFilterFromMime(single mime filter (C header file)) Compared values are not the same
Actual (dialog.selectedNameFilter()): ""
Expected (expectedSelectedNameFilter) : "C header (*.h)"</pre></div>
<p><tt style="background: #ebebeb; font-size: 13px;">QFileDialog::selectMimeTypeFilter()</tt> calls <tt style="background: #ebebeb; font-size: 13px;">KDEPlatformFileDialogHelper::selectNameFilter()</tt> which in turn calls <tt style="background: #ebebeb; font-size: 13px;">qt2KdeFilter()</tt>, so it seems that my patch in <a href="https://phabricator.kde.org/D1813" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D1813</a> was at the wrong place/level, as it was changing <tt style="background: #ebebeb; font-size: 13px;">kde2QtFilter()</tt>...</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rPLASMAINTEGRATION Integration for Qt applications in Plasma</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2365" rel="noreferrer">https://phabricator.kde.org/D2365</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/kfiledialog_unittest.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>elvisangelaccio, dfaure, graesslin<br /><strong>Cc: </strong>plasma-devel, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>