<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115478/">https://git.reviewboard.kde.org/r/115478/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 4th, 2014, 5:17 p.m. UTC, <b>Alex Merry</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Has the Qt patch been submitted upstream?</pre>
</blockquote>
<p>On February 4th, 2014, 6:46 p.m. UTC, <b>Dominik Haumann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Meanwhile yes: https://codereview.qt-project.org/#change,77390</pre>
</blockquote>
<p>On February 19th, 2014, 1:43 p.m. UTC, <b>Alex Merry</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't think it's useful to have tests that fail because of upstream issues in the repo, at least not in such a way that it causes the testsuite as a whole to report a failure.
My suggestion is to mark (1) as an expected failure (http://qt-project.org/doc/qt-5/qtest.html#QEXPECT_FAIL), and mark (2) as an expected failure only if the Qt version is too old. With comments about why the failures are expected, of course.</pre>
</blockquote>
<p>On February 19th, 2014, 5:37 p.m. UTC, <b>Dominik Haumann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I've pushed these changes to the Qt stable branch: https://codereview.qt-project.org/#change,77390
So if build.kde.org uses a recent enough Qt version, I'd expect this test to pass. What Qt version does build.kde.org use right now?</pre>
</blockquote>
<p>On February 19th, 2014, 5:40 p.m. UTC, <b>Alex Merry</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It's not just build.kde.org, it's also users (or, more likely, packagers and developers). If you know what point-release will get this fix, then just test for that.</pre>
</blockquote>
<p>On February 19th, 2014, 11:26 p.m. UTC, <b>Ben Cooksley</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The CI system rebuilds Qt once a week.
The latest build log is visible at http://build.kde.org/job/qt5_master_qt5/119/consoleText - it built revision 805c735 of the qt5.git supermodule.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I agree with Alex, please adjust the test to use QEXPECT_FAIL.</pre>
<br />
<p>- Kevin</p>
<br />
<p>On February 4th, 2014, 5:07 p.m. UTC, Dominik Haumann wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDE Frameworks, Àlex Fiestas and Gregor Mi.</div>
<div>By Dominik Haumann.</div>
<p style="color: grey;"><i>Updated Feb. 4, 2014, 5:07 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
frameworkintegration
</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;">The following QPA integration does not work as expected:
QStringList nameFilterList = QStringList() << "c (*.cpp)" << "h (*.h)";
dialog.setNameFilters(nameFilterList);
QString selectNameFilter("h (*.h)");
dialog.selectNameFilter(selectNameFilter);
// QCOMPARE(dialog.selectedNameFilter(), selectNameFilter); // (1) always fails, no matter what
dialog.show();
QCOMPARE(dialog.selectedNameFilter(), selectNameFilter); // (2) currently also fails, Qt patch required
The problem is described in detail in:
http://mail.kde.org/pipermail/kde-frameworks-devel/2014-February/010691.html
The Qt patches that make (2) work are as follows:
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index da026d2..72b2310 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -627,7 +627,8 @@ void QFileDialogPrivate::helperPrepareShow(QPlatformDialogHelper *)
options->setInitialDirectory(directory.exists() ?
QUrl::fromLocalFile(directory.absolutePath()) :
QUrl());
- options->setInitiallySelectedNameFilter(q->selectedNameFilter());
+ if (options->initiallySelectedNameFilter().isEmpty())
+ options->setInitiallySelectedNameFilter(q->selectedNameFilter());
if (options->initiallySelectedFiles().isEmpty())
options->setInitiallySelectedFiles(userSelectedFiles());
}
@@ -1447,6 +1448,7 @@ void QFileDialog::selectNameFilter(const QString &filter)
{
Q_D(QFileDialog);
if (!d->usingWidgets()) {
+ d->options->setInitiallySelectedNameFilter(filter);
d->selectNameFilter_sys(filter);
return;
}
However, the QCOMPARE in (1) is still an open issue. And no fix in sight...
Ok to commit this to frameworksintegration (and therewith make it unstable?)</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;">The attached unit test currently fails due to a bug in the Qt QPA.
With the Qt patch above, (2) in the unit test passes, so one is able to call QFileDialog::selectNameFilter().
However, (1) remains broken.</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/kfiledialog_unittest.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>autotests/CMakeLists.txt <span style="color: grey">(fb58b3a)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115478/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>