<table><tr><td style="">glennw updated this revision to Diff 38685.<br />glennw 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/D14435">View Revision</a></tr></table><br /><div><div><p>Added an autotest to ensure that the line edit mask is updated correctly.</p>
<p>A couple of notes about the test results below:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">I tried to set the current locale in the new test to ensure it reproduces. The setLocale() function is not reentrant, which should be fine unless tests are run in parallel?</li>
<li class="remarkup-list-item">There are other tests in this file that fail before my patch, and now pass afterwards. I guess they are probably passing in CI due to the CI locale setting?</li>
</ul>
<p>Test results before this patch:</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);">********* Start testing of KTimeComboBoxTest *********
Config: Using QtTest library 5.9.5, Qt 5.9.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.3.0)
PASS : KTimeComboBoxTest::initTestCase()
PASS : KTimeComboBoxTest::_q_showIfNotHidden()
FAIL! : KTimeComboBoxTest::testDefaults() Compared values are not the same
Actual (m_combo->time()) : 12:00:00.000
Expected (QTime(0, 0, 0, 0)): 00:00:00.000
Loc: [kde/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(33)]
PASS : KTimeComboBoxTest::testValidNull()
FAIL! : KTimeComboBoxTest::testTimeRange() Compared values are not the same
Actual (m_combo->isValid()): 1
Expected (false) : 0
Loc: [kde/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(69)]
PASS : KTimeComboBoxTest::testTimeListInterval()
PASS : KTimeComboBoxTest::testTimeList()
PASS : KTimeComboBoxTest::testOptions()
PASS : KTimeComboBoxTest::testDisplayFormat()
FAIL! : KTimeComboBoxTest::testMask() Compared values are not the same
Actual (mask.contains(QLatin1String("aa"))): 0
Expected (true) : 1
Loc: [kde/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(198)]
PASS : KTimeComboBoxTest::cleanupTestCase()
Totals: 8 passed, 3 failed, 0 skipped, 0 blacklisted, 71ms
********* Finished testing of KTimeComboBoxTest *********</pre></div>
<p>Test results after:</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);">********* Start testing of KTimeComboBoxTest *********
Config: Using QtTest library 5.9.5, Qt 5.9.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.3.0)
PASS : KTimeComboBoxTest::initTestCase()
PASS : KTimeComboBoxTest::_q_showIfNotHidden()
PASS : KTimeComboBoxTest::testDefaults()
PASS : KTimeComboBoxTest::testValidNull()
PASS : KTimeComboBoxTest::testTimeRange()
PASS : KTimeComboBoxTest::testTimeListInterval()
PASS : KTimeComboBoxTest::testTimeList()
PASS : KTimeComboBoxTest::testOptions()
PASS : KTimeComboBoxTest::testDisplayFormat()
PASS : KTimeComboBoxTest::testMask()
PASS : KTimeComboBoxTest::cleanupTestCase()
Totals: 11 passed, 0 failed, 0 skipped, 0 blacklisted, 69ms
********* Finished testing of KTimeComboBoxTest *********</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R236 KWidgetsAddons</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D14435?vs=38638&id=38685">https://phabricator.kde.org/D14435?vs=38638&id=38685</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14435">https://phabricator.kde.org/D14435</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/ktimecomboboxtest.cpp<br />
autotests/ktimecomboboxtest.h<br />
src/ktimecombobox.cpp</div></div></div><br /><div><strong>To: </strong>glennw, cfeck, mlaurent<br /><strong>Cc: </strong>ngraham, kde-frameworks-devel, michaelh, bruns<br /></div>