[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:17:07 UTC 2016


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

The following commit has been merged in the master branch:
commit c00efd5c31f860362f0c08e575ba76ded405cd71
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sun Sep 19 16:29:29 2010 +0000

    Completely tidied up all of the ChatInfo class to follow KDE lib policy.
    
    
    svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1177162
---
 lib/telepathychatinfo.cpp | 91 +++++++++++++++++++++++++++++++++++++++++++++--
 lib/telepathychatinfo.h   | 69 ++++++++++-------------------------
 2 files changed, 108 insertions(+), 52 deletions(-)

diff --git a/lib/telepathychatinfo.cpp b/lib/telepathychatinfo.cpp
index 246f37f..bf33657 100644
--- a/lib/telepathychatinfo.cpp
+++ b/lib/telepathychatinfo.cpp
@@ -19,7 +19,94 @@
 
 #include "telepathychatinfo.h"
 
-TelepathyChatInfo::TelepathyChatInfo() :
-        m_incomingIconPath("incoming_icon.png")
+//FIXME HTML escaping is maybe needed.
+
+class TelepathyChatInfoPrivate
+{
+public:
+    QString chatName;
+    QString sourceName;
+    QString destinationName;
+    QString destinationDisplayName;
+    QUrl incomingIconPath;
+    QUrl outgoingIconPath;
+    QDateTime timeOpened;
+};
+
+TelepathyChatInfo::TelepathyChatInfo()
+        : d(new TelepathyChatInfoPrivate)
+{
+}
+
+TelepathyChatInfo::~TelepathyChatInfo()
+{
+    delete d;
+}
+
+QString TelepathyChatInfo::chatName() const
 {
+    return d->chatName;
+};
+
+void TelepathyChatInfo::setChatName(const QString& chatName)
+{
+    d->chatName = chatName;
+};
+
+QString TelepathyChatInfo::sourceName() const
+{
+    return d->sourceName;
+};
+
+void TelepathyChatInfo::setSourceName(const QString& sourceName)
+{
+    d->sourceName = sourceName;
+};
+
+QString TelepathyChatInfo::destinationName() const
+{
+    return d->destinationName;
 }
+void TelepathyChatInfo::setDestinationName(const QString& destinationName)
+{
+    d->destinationName = destinationName;
+};
+
+QString TelepathyChatInfo::destinationDisplayName() const
+{
+    return d->destinationDisplayName;
+}
+void TelepathyChatInfo::setDestinationDisplayName(const QString& destinationDisplayName)
+{
+    d->destinationDisplayName = destinationDisplayName;
+}
+
+QUrl TelepathyChatInfo::incomingIconPath() const
+{
+    return d->incomingIconPath;
+};
+
+void TelepathyChatInfo::setIncomingIconPath(const QUrl& incomingIconPath)
+{
+    d->incomingIconPath = incomingIconPath;
+};
+
+QUrl TelepathyChatInfo::outgoingIconPath() const
+{
+    return d->outgoingIconPath;
+};
+
+void TelepathyChatInfo::setOutgoingIconPath(const QUrl& outgoingIconPath)
+{
+    d->outgoingIconPath = outgoingIconPath;
+};
+
+QDateTime TelepathyChatInfo::timeOpened() const
+{
+    return d->timeOpened;
+};
+
+void TelepathyChatInfo::setTimeOpened(const QDateTime& timeOpened)
+{
+    d->timeOpened = timeOpened;
+};
diff --git a/lib/telepathychatinfo.h b/lib/telepathychatinfo.h
index b6611f9..1a3ba04 100644
--- a/lib/telepathychatinfo.h
+++ b/lib/telepathychatinfo.h
@@ -26,76 +26,45 @@
 
 /** Containts all the information needed for the header generation from the Adium/Kopete templates */
 
+class TelepathyChatInfoPrivate;
+
 class TelepathyChatInfo
 {
 public:
     TelepathyChatInfo();
+    ~TelepathyChatInfo();
 
     /** A name for the chat. For a one-on-one chat, this will be the display name of the remote user. For a group chat, it is the group chat name or topic, as appropriate. */
-    QString chatName() const {
-        return m_chatName;
-    };
-    void setChatName(const QString chatName) {
-        m_chatName = chatName;
-    };
+    QString chatName() const;
+    void setChatName(const QString& chatName);
 
-    /** The name of the source account for this chat. */
-    QString sourceName() const {
-        return m_sourceName;
-    };
-    void setSourceName(const QString sourceName) {
-        m_sourceName = sourceName;
-    };
+    /** The name of the source account for this chat. (i.e MSN)*/
+    QString sourceName() const;
+    void setSourceName(const QString& sourceName);
 
     /** The name of the chat's destination.*/
-    QString destinationName() const {
-        return m_destinationName;
-    }
-    void setDestinationName(const QString destinationName) {
-        m_destinationName = destinationName;
-    };
+    QString destinationName() const;
+    void setDestinationName(const QString& destinationName);
 
     /** The serverside (remotely set) name of the chat's destination, such as an MSN display name. */
-    QString destinationDisplayName() const {
-        return m_destinationDisplayName;
-    }
-    void setDestinationDisplayName(const QString destinationDisplayName) {
-        m_destinationDisplayName = destinationDisplayName;
-    }
+    QString destinationDisplayName() const;
+    void setDestinationDisplayName(const QString& destinationDisplayName);
 
     //FIXME this documentation should say (optional) - then the handing of not setting it should be handled in the getter method - or even the constructor.
     /** A full path to the image of the remote user. If the remote user does not have an image, or this is a group chat so no image is appropriate, this tag will be replaced by incoming_icon.png, so you should have that file available if this tag is used. */
-    QUrl incomingIconPath() const {
-        return m_incomingIconPath;
-    };
-    void setIncomingIconPath(const QUrl incomingIconPath) {
-        m_incomingIconPath = incomingIconPath;
-    };
+    QUrl incomingIconPath() const;
+    void setIncomingIconPath(const QUrl& incomingIconPath);
 
     /** A full path to the image for the local user. If the local user does not have an image this tag will be replaced by outgoing_icon.png, so you should have that file available if this tag is used. */
-    QUrl outgoingIconPath() const {
-        return m_outgoingIconPath;
-    };
-    void setOutgoingIconPath(const QUrl outgoingIconPath) {
-        m_outgoingIconPath = outgoingIconPath;
-    };
+    QUrl outgoingIconPath() const;
+    void setOutgoingIconPath(const QUrl& outgoingIconPath);
 
     /** The time at which the chat was opened. */
-    QDateTime timeOpened() const {
-        return m_timeOpened;
-    };
-    void setTimeOpened(const QDateTime timeOpened) {
-        m_timeOpened = timeOpened;
-    };
+    QDateTime timeOpened() const;
+    void setTimeOpened(const QDateTime& timeOpened);
 
 private:
-    QString m_chatName;
-    QString m_sourceName;
-    QString m_destinationName;
-    QString m_destinationDisplayName;
-    QUrl m_incomingIconPath;
-    QUrl m_outgoingIconPath;
-    QDateTime m_timeOpened;
+    TelepathyChatInfoPrivate* const d;
 
 };
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list