[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ktp-common-internals/mklapetek/SpaceBar] KTp/Declarative: [declarative] Make Conversation an uncrea
From: Martin Klapetek <mklapetek () kde ! org>
Date: 2016-03-16 0:16:18
Message-ID: E1afz8M-0005bD-KX () scm ! kde ! org
[Download RAW message or body]
Git commit faf9ec60261ced0f12226a93c9b42299c8187205 by Martin Klapetek.
Committed on 16/03/2016 at 00:14.
Pushed by mklapetek into branch 'mklapetek/SpaceBar'.
[declarative] Make Conversation an uncreatable type
M +2 -2 KTp/Declarative/qml-plugins.cpp
http://commits.kde.org/telepathy-common-internals/faf9ec60261ced0f12226a93c=
9b42299c8187205
diff --git a/KTp/Declarative/qml-plugins.cpp b/KTp/Declarative/qml-plugins.=
cpp
index 4aa80b0..bb61ce5 100644
--- a/KTp/Declarative/qml-plugins.cpp
+++ b/KTp/Declarative/qml-plugins.cpp
@@ -55,7 +55,6 @@ void QmlPlugins::registerTypes(const char *uri)
qmlRegisterType<KTp::AccountsListModel> (uri, 0, 1, "AccountsListModel=
");
=
qmlRegisterType<ConversationsModel> (uri, 0, 1, "ConversationsModel");
- qmlRegisterType<Conversation>(uri, 0, 1, "Conversation");
qmlRegisterType<PinnedContactsModel>(uri, 0, 1, "PinnedContactsModel");
qmlRegisterType<ContactPin>(uri, 0, 1, "ContactPin");
qmlRegisterType<FilteredPinnedContactsProxyModel>(uri, 0, 1, "Filtered=
PinnedContactsProxyModel");
@@ -67,7 +66,8 @@ void QmlPlugins::registerTypes(const char *uri)
QLatin1String("It will be created once the conversation is created=
"));
=
qmlRegisterType<TelepathyManager>();
- qmlRegisterType<ConversationsModel>();
+ qmlRegisterUncreatableType<ConversationsModel>(uri, 0, 1, "Conversatio=
n",
+ QStringLiteral("Conversation type cannot be created from QML"));
qmlRegisterType<Tp::PendingChannelRequest>();
qRegisterMetaType<Tp::Presence>();
qRegisterMetaType<KTp::Presence>();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic