<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/124963/">https://git.reviewboard.kde.org/r/124963/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On October 10th, 2015, 1:56 p.m. UTC, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/124963/diff/4/?file=399636#file399636line65" style="color: black; font-weight: bold; text-decoration: underline;">src/knewpasswordwidget.h</a>
<span style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">65</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);</span></pre></td>
</tr>
</tbody>
</table>
<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;">these 9 lines could be done in one or two:</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> <span style="color: #008000; font-weight: bold">bool</span> <span style="color: #008000; font-weight: bold">passOk</span> <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">m_passwordWidget-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">passwordStatus</span><span style="color: #666666">()</span> <span style="color: #666666">==</span> <span style="color: #008000; font-weight: bold">WeakPassword</span> <span style="color: #666666">||</span> <span style="color: #008000; font-weight: bold">m_passwordWidget-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">passwordStatus</span><span style="color: #666666">()</span> <span style="color: #666666">==</span> <span style="color: #008000; font-weight: bold">StrongPassword</span><span style="color: #666666">;</span>
<span style="color: #008000; font-weight: bold">m_buttonBox-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">button</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QDialogButtonBox</span><span style="color: #666666">:</span><span style="color: #AA22FF">:Ok</span><span style="color: #666666">)</span><span style="color: #008000; font-weight: bold">-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">setEnabled</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">passOk</span><span style="color: #666666">);</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But I guess you wanted to show a switch so people could add more code in there like showing "your password is too weak"?</p></pre>
</blockquote>
<p>On October 10th, 2015, 2:43 p.m. UTC, <b>Elvis Angelaccio</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Yeah that was the idea, but indeed is similar to what we already show in the code snippet right below this one. I'm ok with using your version if you want.</p></pre>
</blockquote>
<p>On October 10th, 2015, 3:23 p.m. UTC, <b>David Faure</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'll let you decide, based on what a real application would most probably need.</p></pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; 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;">Well, if this would be a good place to show "your password is too weak", then at least add a comment about that in the sample code, inside the switch - and if not, then use my version.</p></pre>
<br />
<p>- David</p>
<br />
<p>On August 30th, 2015, 8:26 a.m. UTC, Elvis Angelaccio 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 and Christoph Feck.</div>
<div>By Elvis Angelaccio.</div>
<p style="color: grey;"><i>Updated Aug. 30, 2015, 8:26 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kwidgetsaddons
</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;">This widget is a stripped-down version of KNewPasswordDialog, without any dialog-specific stuff.</p>
<h3 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Why a new widget?</h3>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This widget is meant to be easily embedded in any custom password dialog, including KNewPasswordDialog. It's the least common denominator of features that any password dialog should offer to the user.</p>
<h3 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Features</h3>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Password visibility action (same as RR 124698). The password verification field is hidden if the user shows the password.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Background warning colour. The password verification field gets a coloured background whenever the password and its verification don't match. (feature borrowed from Keepass)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Password status signal. This allows the upper level dialogs to update their stuff (enable/disable OK button, show warnings for low password strength, etc.)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Password strength bar can be hidden.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Unit test.</li>
</ul>
<h3 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Use cases</h3>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">At least the following:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Ark (new archive dialog)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">KNewPasswordDialog refactoring (my next RR if this one gets accepted)</li>
</ul></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/CMakeLists.txt <span style="color: grey">(ac708ef33e3be89db85d43911f96e536c52f741d)</span></li>
<li>autotests/knewpasswordwidgettest.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>autotests/knewpasswordwidgettest.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/CMakeLists.txt <span style="color: grey">(e03e9bbd6d73811873b0a465f86da269f4295138)</span></li>
<li>src/knewpasswordwidget.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/knewpasswordwidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/knewpasswordwidget.ui <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124963/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/08/28/5796469c-28b7-4151-b9cb-6a327631db75__knewpasswordwidget1.png">knewpasswordwidget1.png</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/08/28/b3bfc9ac-ab8e-404c-8091-b5ad9e3e054f__knewpasswordwidget2.png">knewpasswordwidget2.png</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/08/28/dfaeea4e-65da-4961-b266-986a21f54ca7__knewpasswordwidget3.png">knewpasswordwidget3.png</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>