<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="http://git.reviewboard.kde.org/r/108637/">http://git.reviewboard.kde.org/r/108637/</a>
</td>
</tr>
</table>
<br />
<div>
<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="http://git.reviewboard.kde.org/r/108637/diff/1/?file=109584#file109584line266" style="color: black; font-weight: bold; text-decoration: underline;">kdeui/colors/kcolorbutton.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void KColorButton::KColorButtonPrivate::_k_chooseColor()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">266</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">connect</span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span class="n">okClicked</span><span class="p">()),</span> <span class="n">q</span><span class="p">,</span> <span class="n">SLOT</span><span class="p">(</span><span class="n">_k_colorChosen</span><span class="p">()));</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">266</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">connect</span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span class="n">okClicked</span><span class="p">()),</span> <span class="n">q</span><span class="p">,</span> <span class="n">SLOT</span><span class="p">(</span><span class="n">_k_colorChosen</span><span class="p">()));</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Perhaps this signal/slot is not necessary
because okClicked() call accept()
which emit accepted()
see:
void QDialog::done(int r)
{
....
emit finished(r);
if (r == Accepted)
emit accepted();
...
}
so for me we can remove this line.
</pre>
</div>
<br />
<p>- Laurent</p>
<br />
<p>On January 28th, 2013, 12:27 a.m. UTC, Albert Astals Cid wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://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 kdelibs and Laurent Montel.</div>
<div>By Albert Astals Cid.</div>
<p style="color: grey;"><i>Updated Jan. 28, 2013, 12:27 a.m.</i></p>
<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;">Do not connect colorSelected to _k_colorChosen otherwise two bad things happen:
a) Selecting a color and canceling still changes the color of the color button (this is KColorButtonTest::testChangeAndCancel that fails without my change)
b) If you are in Recent Colors there's a crash (bug 313984 because a lot of bad things happen (this is not in my tests, will add later if you guys agree this is the correct fix))
Laurent added
connect(dialog, SIGNAL(colorSelected(QColor)), q, SLOT(_k_colorChosen()));
to make sure that double click worked, thus i've added KColorButtonTest::testDoubleClickChange() to prove it still works after my change
Comments?
Developed against master, plan to apply against KDE/4.10 too</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;">Okular no longer crashes, the tests</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>kdeui/colors/kcolorbutton.cpp <span style="color: grey">(786cb9d)</span></li>
<li>kdeui/tests/CMakeLists.txt <span style="color: grey">(85f12ed)</span></li>
<li>kdeui/tests/kcolorbuttontest.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>kdeui/tests/kcolorbuttontest.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/108637/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>