<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/112438/">http://git.reviewboard.kde.org/r/112438/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 2nd, 2013, 12:54 a.m. UTC, <b>David Edmundson</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/112438/diff/1/?file=186179#file186179line40" style="color: black; font-weight: bold; text-decoration: underline;">plugins/pintxo/main-options-widget.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</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">40</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">mapper</span> <span class="o">=</span> <span class="k">new</span> <span class="n">QDataWidgetMapper</span><span class="p">(</span><span class="k">this</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;">The superclass already has a DataWidgetMapper with a handy method
handleParamater() to connect up the UI to the model.
Is there a reason to redo this? </pre>
</blockquote>
<p>On September 2nd, 2013, 1:10 a.m. UTC, <b>Anant Kamath</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;">Because handleParameter() takes the currentText property from combo boxes. I needed to send a different property (selectedSimIdentifier) instead of the currentText (the displayed text of the combo box). Hence redid it.</pre>
</blockquote>
<p>On September 2nd, 2013, 1:31 a.m. UTC, <b>David Edmundson</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;">In general, if a library doesn't do what you need it to do - edit the library.
Don't clone it all and re-invent everything, if everyone did that we wouldn't get anywhere and the code would be huge.
You could have just added an extra argument to handleParameter, or even just exposed the datamapper from the superclass.
In this particular case I think if you follow my suggestion of marking that property as USER, you won't have to do this at all.
"The USER attribute indicates whether the property is designated as the user-facing or user-editable property for the class. Normally, there is only one USER property per class (default false). e.g., QAbstractButton::checked is the user editable property for (checkable) buttons. Note that QItemDelegate gets and sets a widget's USER property."
(http://harmattan-dev.nokia.com/docs/library/html/qt4/properties.html)
</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;">Marking the property as USER won't make a difference as handleProperty() is hardcoded to take the "currentText" property for all QComboBox derived widgets.
So I added an extra argument to handleParameter:
See https://git.reviewboard.kde.org/r/112441. </pre>
<br />
<p>- Anant</p>
<br />
<p>On September 2nd, 2013, 1:34 a.m. UTC, Anant Kamath 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 Telepathy and David Edmundson.</div>
<div>By Anant Kamath.</div>
<p style="color: grey;"><i>Updated Sept. 2, 2013, 1:34 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;">Merge plugin for the SMS connection manager (pintxo)</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;">Builds, works</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>data/profiles/sms.profile <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/CMakeLists.txt <span style="color: grey">(b2af316891af14232c5aaa3eebcfd17802c6a1ca)</span></li>
<li>plugins/pintxo/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/Messages.sh <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/main-options-widget.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/main-options-widget.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/main-options-widget.ui <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/modem-combobox.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/modem-combobox.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/pintxo-account-ui-plugin.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/pintxo-account-ui-plugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/pintxo-account-ui.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/pintxo/pintxo-account-ui.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112438/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/09/02/am1.jpeg">Screenshot</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>