[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:20:55 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=97ba0f0

The following commit has been merged in the master branch:
commit 97ba0f0b85b2ba52666ba17a2959856de7b0e882
Author: Lasath Fernando <kde at lasath.org>
Date:   Sat Jan 14 23:39:44 2012 +1100

    Add comments justifying each class that's registered to QML
---
 lib/qml-plugins.cpp | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/qml-plugins.cpp b/lib/qml-plugins.cpp
index 05ed88d..44effae 100644
--- a/lib/qml-plugins.cpp
+++ b/lib/qml-plugins.cpp
@@ -20,19 +20,29 @@
 #include "qml-plugins.h"
 
 #include <QtDeclarative/QDeclarativeItem>
+
 #include "messages-model.h"
 #include "conversation.h"
 #include "telepathy-text-observer.h"
 #include "conversations-model.h"
 #include "conversation-target.h"
 
-void QmlPlugins::registerTypes ( const char *uri )
+void QmlPlugins::registerTypes(const char *uri)
 {
-    qmlRegisterType<TelepathyTextObserver> ( uri, 0, 1, "TelepathyTextObserver" );
+    // this can be used in QML because it spits out Conversations which
+    // can be given to ChatWidget.qml
+    qmlRegisterType<TelepathyTextObserver> (uri, 0, 1, "TelepathyTextObserver");
+    // is currently instanitized and used by the multi-user plasmoid
+    qmlRegisterType<ConversationsModel>(uri, 0, 1, "ConversationsModel");
+    // 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
+    // allows exactly that
     qmlRegisterType<ConversationTarget>();
-    qmlRegisterType<MessagesModel> ( uri, 0, 1, "MessagesModel" );
-    qmlRegisterType<ConversationsModel>(uri, 0, 1, "ConversationsModel");
+    qmlRegisterType<MessagesModel> ();
 }
 
-Q_EXPORT_PLUGIN2 ( conversation, QmlPlugins );
+Q_EXPORT_PLUGIN2(conversation, QmlPlugins);

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list