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


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

The following commit has been merged in the master branch:
commit 0f2c01f4e27e3f295a3e82dbb5006c5ab35ee62c
Author: Lasath Fernando <kde at lasath.org>
Date:   Fri Feb 3 19:41:55 2012 +1100

    Remove MessageParts enum and store MainMessage as separate QString
---
 lib/message.cpp | 16 ++++++----------
 lib/message.h   |  7 ++-----
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/lib/message.cpp b/lib/message.cpp
index 389434b..30bc0ba 100644
--- a/lib/message.cpp
+++ b/lib/message.cpp
@@ -38,28 +38,24 @@ Message::Message(const Tp::Message &original)
 
 QString Message::mainMessagePart() const
 {
-    return m_content[Message::MainMessage];
+    return m_mainPart;
 }
 
 void Message::setMainMessagePart(const QString& message)
 {
-    //FIXME there must be a better way to do this.
-    if (m_content.size() > 0) {
-        m_content[Message::MainMessage] = message;
-    }
-    else {
-        m_content.append(message);
-    }
+    m_mainPart = message;
 }
 
 void Message::appendMessagePart(const QString& part)
 {
-    m_content << part;
+    m_parts << part;
 }
 
 QString Message::finalizedMessage() const
 {
-    QString msg = m_content.join(QLatin1String("
"));
+    QString msg = m_mainPart + QLatin1String("
") +
+        m_parts.join(QLatin1String("
"));
+
     kDebug() << msg;
     return msg;
 }
diff --git a/lib/message.h b/lib/message.h
index c3fdee6..1f0bc35 100644
--- a/lib/message.h
+++ b/lib/message.h
@@ -39,11 +39,8 @@ public:
 private:
     Tp::Message m_originalMessage;
     QVariantMap m_properties;
-    QStringList m_content;
-
-    enum MessageParts {
-        MainMessage = 0
-    };
+    QString     m_mainPart;
+    QStringList m_parts;
 };
 
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list