[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:06:15 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=b9c303e

The following commit has been merged in the master branch:
commit b9c303ee945d6f5b2ff50211d744c3283dcb814f
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue Jan 22 15:13:25 2013 +0000

    Always check Account && Contact are valid before starting actions
    
    Reviewed-by: Dan Vratil
---
 KTp/actions.cpp | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/KTp/actions.cpp b/KTp/actions.cpp
index 879b54e..2e2ae5e 100644
--- a/KTp/actions.cpp
+++ b/KTp/actions.cpp
@@ -38,6 +38,10 @@ Tp::PendingChannelRequest* Actions::startChat(const Tp::AccountPtr& account,
                                               const Tp::ContactPtr& contact,
                                               bool delegateToPreferredHandler)
 {
+    if (account.isNull() || contact.isNull()) {
+        kWarning() << "Parameters invalid";
+    }
+
     kDebug() << "Requesting text channel for" << contact->id();
 
     Tp::ChannelRequestHints hints;
@@ -56,6 +60,10 @@ Tp::PendingChannelRequest* Actions::startChat(const Tp::AccountPtr& account,
 Tp::PendingChannelRequest* Actions::startAudioCall(const Tp::AccountPtr& account,
                                                    const Tp::ContactPtr& contact)
 {
+    if (account.isNull() || contact.isNull()) {
+        kWarning() << "Parameters invalid";
+    }
+
     kDebug() << "Requesting audio channel for" << contact->id();
 
     return account->ensureAudioCall(contact,
@@ -67,6 +75,10 @@ Tp::PendingChannelRequest* Actions::startAudioCall(const Tp::AccountPtr& account
 Tp::PendingChannelRequest* Actions::startAudioVideoCall(const Tp::AccountPtr& account,
                                                         const Tp::ContactPtr& contact)
 {
+    if (account.isNull() || contact.isNull()) {
+        kWarning() << "Parameters invalid";
+    }
+
     kDebug() << "Requesting audio-video channel for" << contact->id();
 
     return account->ensureAudioVideoCall(contact,
@@ -79,6 +91,10 @@ Tp::PendingChannelRequest* Actions::startAudioVideoCall(const Tp::AccountPtr& ac
 Tp::PendingChannelRequest* Actions::startDesktopSharing(const Tp::AccountPtr& account,
                                                         const Tp::ContactPtr& contact)
 {
+    if (account.isNull() || contact.isNull()) {
+        kWarning() << "Parameters invalid";
+    }
+
     kDebug() << "Requesting stream tube for" << contact->id();
 
     return account->createStreamTube(contact,
@@ -91,6 +107,10 @@ Tp::PendingChannelRequest* Actions::startFileTransfer(const Tp::AccountPtr& acco
                                                       const Tp::ContactPtr& contact,
                                                       const QString& filePath)
 {
+    if (account.isNull() || contact.isNull()) {
+        kWarning() << "Parameters invalid";
+    }
+
     kDebug() << "Requesting file transfer of" << filePath << "to" << contact->id();
 
     Tp::FileTransferChannelCreationProperties fileTransferProperties(
@@ -105,6 +125,10 @@ Tp::PendingChannelRequest* Actions::startFileTransfer(const Tp::AccountPtr& acco
 void Actions::openLogViewer(const Tp::AccountPtr& account,
                             const Tp::ContactPtr& contact)
 {
+    if (account.isNull() || contact.isNull()) {
+        kWarning() << "Parameters invalid";
+    }
+
     kDebug() << "Opening logviewer for" << contact->id();
 
     QStringList arguments;

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list