<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/103629/">http://git.reviewboard.kde.org/r/103629/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 11th, 2012, 9:35 p.m., <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/103629/diff/5/?file=46307#file46307line27" style="color: black; font-weight: bold; text-decoration: underline;">lib/CMakeLists.txt</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; "></pre></td>
</tr>
</tbody>
<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">27</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "># static-conversation.cpp</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;">Try not to commit commented out code.
(also if this is what I think it's for, I'm not sure it's a great name)</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;">Yeah I'll get around to building those eventually. And hell, half my classes could use better names - I just can't think up of any.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 11th, 2012, 9:35 p.m., <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/103629/diff/5/?file=46335#file46335line29" style="color: black; font-weight: bold; text-decoration: underline;">lib/qml-plugins.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; "></pre></td>
</tr>
</tbody>
<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">29</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">QmlPlugins</span><span class="o">::</span><span class="n">registerTypes</span> <span class="p">(</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">uri</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;">You really don't need to register all these types.
Only register the stuff that you should be able to create in QML.
Especially when actually using it would result in immediately throwing a kError. (which applies to at least one of these classes)
I think you only need ConversationsModel. Though you will then need to fix a few things just like we did with conversationtarget.
Even for your single person chat, you're only going to have one entry point, you'd never construct a messagesModel (etc) from inside QML.
Plus you'll be able to tidy up some stuff because of it.</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;">// this can be used in QML because it spits out Conversations which
// can be given to ChatWidget.qml
qmlRegisterType<TelepathyTextObserver> (uri, 0, 1, "TelepathyTextObserver");
// this is currently instanitized and used by the multi-user plasmoid
qmlRegisterType<ConversationsModel>(uri, 0, 1, "ConversationsModel");
// this isn't instanitized directly, but need to be registered,
// because ChatWidget has a property of type Conversation
qmlRegisterType<Conversation>(uri, 0, 1, "Conversation");
// these two are used, but not instanitized within QML
// and it turns out calling qmlRegisterType with no arguments
// does exactly that
qmlRegisterType<ConversationTarget>();
qmlRegisterType<MessagesModel> ();</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 11th, 2012, 9:35 p.m., <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/103629/diff/5/?file=46343#file46343line74" style="color: black; font-weight: bold; text-decoration: underline;">plasmoid/contents/ui/main.qml</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; "></pre></td>
</tr>
</tbody>
<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">74</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">// function popupApplet() {</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;">try to avoid committing large chunks of commented out code. </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;">Yeah, I'm going to go through all the QML code and clean it up soon.
Okay, what I actually ended up doing was renaming model to messages and removing all commented code. If I try to refractor everything at once, I will loose my sanity. </pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 11th, 2012, 9:35 p.m., <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/103629/diff/5/?file=46343#file46343line95" style="color: black; font-weight: bold; text-decoration: underline;">plasmoid/contents/ui/main.qml</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; "></pre></td>
</tr>
</tbody>
<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">95</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> console.log("deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrrrrrrrrrrp!");</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;">No.</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;">Alright, it outlived its usefulness a while ago. Will remove.</pre>
<br />
<p>- Lasath</p>
<br />
<p>On January 10th, 2012, 10:01 a.m., Lasath Fernando wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.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 Lasath Fernando.</div>
<p style="color: grey;"><i>Updated Jan. 10, 2012, 10:01 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;">Right, I decided that I should have reviewed and/or merge what work I've done so far rather than letting it pile up in its corner into a giant worthless clump.
To the people that haven't heard (or wasn't at woshibon), this is a chat plasmoid that more or less behaves like facebook and google talk, except it sits in your taskbar :)
And in terms of feedback, at this stage I think design issues should take priority over sane code because the main reason I'm doing this is because I don't want to have to do any massive restructuring later on.
And if things don't make sense, ask me (I didn't comment/document anything well and I'm certainly too sleepy now ;)
PS: All the code is in my scratch repo
http://quickgit.kde.org/?p=clones%2Ftelepathy-text-ui%2Ffernando%2Fqmlplugin.git&a=shortlog&h=refs/heads/qml_plugins2</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;">Um.. yeah... about that... :/</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>CMakeLists.txt <span style="color: grey">(d1cc185)</span></li>
<li>lib/CMakeLists.txt <span style="color: grey">(5d39a62)</span></li>
<li>lib/adium-theme-content-info.h <span style="color: grey">(e293732)</span></li>
<li>lib/adium-theme-header-info.h <span style="color: grey">(952dc48)</span></li>
<li>lib/adium-theme-message-info.h <span style="color: grey">(10c00a2)</span></li>
<li>lib/adium-theme-status-info.h <span style="color: grey">(926586a)</span></li>
<li>lib/adium-theme-view.h <span style="color: grey">(c2fae74)</span></li>
<li>lib/adium-theme-view.cpp <span style="color: grey">(c834c94)</span></li>
<li>lib/chat-search-bar.h <span style="color: grey">(315fd2b)</span></li>
<li>lib/chat-search-bar.cpp <span style="color: grey">(15aa5da)</span></li>
<li>lib/chat-text-edit.cpp <span style="color: grey">(b0476f5)</span></li>
<li>lib/chat-widget.h <span style="color: grey">(30afa31)</span></li>
<li>lib/chat-widget.cpp <span style="color: grey">(9313c03)</span></li>
<li>lib/chat-window-style-manager.h <span style="color: grey">(c876ba8)</span></li>
<li>lib/chat-window-style-manager.cpp <span style="color: grey">(8604c97)</span></li>
<li>lib/chat-window-style.cpp <span style="color: grey">(7b770cf)</span></li>
<li>lib/conversation-que-manager.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversation-que-manager.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversation-target.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversation-target.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversation.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversation.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversations-model.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/conversations-model.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/logmanager.h <span style="color: grey">(4e11086)</span></li>
<li>lib/logmanager.cpp <span style="color: grey">(61484af)</span></li>
<li>lib/messages-model.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/messages-model.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/qml-plugins.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/qml-plugins.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/qmldir <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/telepathy-text-observer.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>lib/telepathy-text-observer.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>plasmoid/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>
<li>plasmoid/contents/ui/ChatWidget.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>plasmoid/contents/ui/ConversationDelegate.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>plasmoid/contents/ui/TextDelegate.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>plasmoid/contents/ui/main.qml <span style="color: grey">(PRE-CREATION)</span></li>
<li>plasmoid/metadata.desktop <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103629/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>