<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/112032/">http://git.reviewboard.kde.org/r/112032/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 13th, 2013, 9:41 a.m. CEST, <b>Kevin Ottens</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="http://git.reviewboard.kde.org/r/112032/diff/2/?file=178275#file178275line132" style="color: black; font-weight: bold; text-decoration: underline;">tier1/kwidgetsaddons/src/kpassivepopup.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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 KPassivePopup::init( WId window )</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">connect</span><span class="p">(</span> <span class="k">this</span><span class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span class="n">clicked</span><span class="p">()),</span> <span class="n">SLOT</span><span class="p">(</span><span class="n">hide</span><span class="p">())</span> <span class="p">);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">connect</span><span class="p">(</span> <span class="k">this</span><span class="p">,</span> <span class="k">static_cast</span><span class="o"><</span><span class="kt">void</span><span class="p">(</span><span class="n">KPassivePopup</span><span class="o">::*</span><span class="p">)()</span><span class="o">></span><span class="p">(</span><span class="o">&</span><span class="n">KPassivePopup</span><span class="o">::</span><span class="n">clicked</span><span class="p">),</span> <span class="k">this</span><span class="p">,</span> <span class="o">&</span><span class="n">KPassivePopup</span><span class="o">::</span><span class="n">hide</span> <span class="p">);</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;">I would stick to the old syntax for cases like this. Or rename the second signal with the point overload... but that would break the source compatibility.</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;">I agree it looks ugly, however it does have the benefit of proper time checking at compile time.
Maybe this could be solved by a macro in Qt like #define Q_MEMBER_PTR(cls, method, args) static_cast<void (cls::*) args>(&cls::method)
and then it would be "connect( this, Q_MEMBER_PTR(KPassivePopup, clicked, ()), this, &KPassivePopup::hide );" which is not quite as ugly
However I don't know if something like this would be accepted in Qt.
For now I will just revert those calls back to the old syntax since breaking source compatibility is not acceptable (especially since those cases would only be discovered at runtime!)</pre>
<br />
<p>- Alexander</p>
<br />
<p>On August 12th, 2013, 6:07 p.m. CEST, Alexander Richardson 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 KDE Frameworks.</div>
<div>By Alexander Richardson.</div>
<p style="color: grey;"><i>Updated Aug. 12, 2013, 6:07 p.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;">Convert tier1/kwidgetaddons to the new Qt5 signal/slot syntax
Conversion was performed using a clang based tool I wrote
(https://github.com/a-richardson/convert2qt5signalslot).
Manual changes required were mostly reverting to the old syntax for
Q_PRIVATE_SLOTS since not all of them use the "_k_" function name
prefix. Also one case where disconnect was used (kcursor.cpp).
Command to perform this was:
find tier1/kwidgetsaddons/ -iname "*.cpp" -print0 | xargs -0 convert2qt5signalslot -skip-prefix=_k_ -p ~/devel/build/kdelibsprint0 | xargs -0 convert2qt5signalslot -skip-prefix=_k_ -p ~/devel/build/kdelibs</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;">Compiles and autotests work</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>tier1/kwidgetsaddons/src/kacceleratormanager.cpp <span style="color: grey">(f50057e8899b30ea2a5dfbe430e82a090299addb)</span></li>
<li>tier1/kwidgetsaddons/src/kactionmenu.cpp <span style="color: grey">(dd1dce144aa028af41fb073a5d3636f4c9e8901b)</span></li>
<li>tier1/kwidgetsaddons/src/kactionselector.cpp <span style="color: grey">(879bb4918d85ee8360e72fab9b5750196c29ad6f)</span></li>
<li>tier1/kwidgetsaddons/src/kassistantdialog.cpp <span style="color: grey">(81d3828e48df6e8e09f91ce8d2056cc8294411ea)</span></li>
<li>tier1/kwidgetsaddons/src/kcursor.cpp <span style="color: grey">(9b0fe01358650a5a82cb9f9cd50edf9506034d4c)</span></li>
<li>tier1/kwidgetsaddons/src/keditlistwidget.cpp <span style="color: grey">(23637a5b60f3582097fb136dfa9adedb44e157e9)</span></li>
<li>tier1/kwidgetsaddons/src/kmessagebox.cpp <span style="color: grey">(1fff72f1df4703b0893396c097b05ebefebbc362)</span></li>
<li>tier1/kwidgetsaddons/src/kmessagewidget.cpp <span style="color: grey">(a4f9975297a0177dfd5bf50ee480b240d60c1d47)</span></li>
<li>tier1/kwidgetsaddons/src/kpageview_p.cpp <span style="color: grey">(4e236f11dea25e280f5b5bf0040424cdb5e934a6)</span></li>
<li>tier1/kwidgetsaddons/src/kpagewidget.cpp <span style="color: grey">(2931623c5a176f1013d5dc15e59df0c6a7a26fb7)</span></li>
<li>tier1/kwidgetsaddons/src/kpassivepopup.cpp <span style="color: grey">(663f63af413b7660c9c1b21af3e3ae4d7c424bbe)</span></li>
<li>tier1/kwidgetsaddons/src/kpassworddialog.cpp <span style="color: grey">(dfab3e9ead7d48b8941e4a44d17565c2ea7d4ddb)</span></li>
<li>tier1/kwidgetsaddons/src/kpixmapregionselectordialog.cpp <span style="color: grey">(76a52b56190079510e99bd056f7602499f015399)</span></li>
<li>tier1/kwidgetsaddons/src/kselectaction.cpp <span style="color: grey">(b388df94baa042e8230f2795f35dd378117c6ab6)</span></li>
<li>tier1/kwidgetsaddons/src/ktoggleaction.cpp <span style="color: grey">(79616dbb37a18b08e9f8a316489cbc8aed8242ba)</span></li>
<li>tier1/kwidgetsaddons/src/ktoolbarpopupaction.cpp <span style="color: grey">(af1fc2a9470444ba035d8babd9d6aad6a7c05e67)</span></li>
<li>tier1/kwidgetsaddons/tests/kassistantdialogtest.cpp <span style="color: grey">(f6be3ef4376dff4f57ac62442e6c55e3a26e12ea)</span></li>
<li>tier1/kwidgetsaddons/tests/kcolorcombotest.cpp <span style="color: grey">(825f3a8ab273cbb43c03001d9eb158ad9211e034)</span></li>
<li>tier1/kwidgetsaddons/tests/keditlistwidgettest.cpp <span style="color: grey">(0a0a46b3139eab6441e685e12bd86ec4c8ac5f54)</span></li>
<li>tier1/kwidgetsaddons/tests/kledtest.cpp <span style="color: grey">(ee45ab3ab82129f03c8b4a3ce7bda69d0c060dc0)</span></li>
<li>tier1/kwidgetsaddons/tests/kmessagewidgettest.cpp <span style="color: grey">(2d8ab453ebaa736fa7dbf04b10d80ca89ca8bd1b)</span></li>
<li>tier1/kwidgetsaddons/tests/kpagewidgettest.cpp <span style="color: grey">(3a10f73a8c481302863cbff52a17a56e167bc2f1)</span></li>
<li>tier1/kwidgetsaddons/tests/kpassivepopuptest.cpp <span style="color: grey">(4e7138523bdbe4166bf0e899d39d9ae1f8b8b447)</span></li>
<li>tier1/kwidgetsaddons/tests/kselectactiontest.cpp <span style="color: grey">(f57f6c53098093d0056a1ba4ccfe9fb49338d186)</span></li>
<li>tier1/kwidgetsaddons/tests/ktoolbarlabelactiontest.cpp <span style="color: grey">(8e8cdf06cdaaa684f4659f63fec87d304837746a)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112032/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<ul>
<li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/08/12/manualChanges_1.diff">Manual changes performed after tool run</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>