[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:19:48 UTC 2016


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

The following commit has been merged in the master branch:
commit 9c3f142abcd87a3af7226d9003d7c520728f308d
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Fri Sep 16 22:51:15 2011 +0100

    Use Q_FOREACH instead of foreach
    
    Reviewed by: David Edmundson <kde at davidedmundson.co.uk>
    REVIEW: 102636
---
 app/telepathy-chat-ui.cpp         |  4 ++--
 lib/channel-contact-model.cpp     |  4 ++--
 lib/chat-widget.cpp               | 12 ++++++------
 lib/chat-window-style-manager.cpp | 10 +++++-----
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/app/telepathy-chat-ui.cpp b/app/telepathy-chat-ui.cpp
index f11bacc..bf24ef2 100644
--- a/app/telepathy-chat-ui.cpp
+++ b/app/telepathy-chat-ui.cpp
@@ -101,7 +101,7 @@ void TelepathyChatUi::handleChannels(const Tp::MethodInvocationContextPtr<> & co
     Q_UNUSED(handlerInfo);
 
     Tp::TextChannelPtr textChannel;
-    foreach(const Tp::ChannelPtr & channel, channels) {
+    Q_FOREACH(const Tp::ChannelPtr & channel, channels) {
         textChannel = Tp::TextChannelPtr::dynamicCast(channel);
         if (textChannel) {
             break;
@@ -118,7 +118,7 @@ void TelepathyChatUi::handleChannels(const Tp::MethodInvocationContextPtr<> & co
     bool forceRaiseWindowHint = false;
 
     //find the relevant channelRequest
-    foreach(const Tp::ChannelRequestPtr channelRequest, channelRequests) {
+    Q_FOREACH(const Tp::ChannelRequestPtr channelRequest, channelRequests) {
         kDebug() << channelRequest->hints().allHints();
         forceRaiseWindowHint = channelRequest->hints().hint(QLatin1String("org.kde.telepathy"), QLatin1String("forceRaiseWindow")).toBool();
     }
diff --git a/lib/channel-contact-model.cpp b/lib/channel-contact-model.cpp
index bf25b1b..78bd7be 100644
--- a/lib/channel-contact-model.cpp
+++ b/lib/channel-contact-model.cpp
@@ -131,7 +131,7 @@ void ChannelContactModel::addContacts(const Tp::Contacts &contacts)
 {
     QList<Tp::ContactPtr> newContacts = contacts.toList();
 
-    foreach(Tp::ContactPtr contact, newContacts) {
+    Q_FOREACH(Tp::ContactPtr contact, newContacts) {
         connect(contact.data(), SIGNAL(aliasChanged(QString)), SLOT(onContactAliasChanged(QString)));
         connect(contact.data(), SIGNAL(presenceChanged(Tp::Presence)), SLOT(onContactPresenceChanged(Tp::Presence)));
     }
@@ -143,7 +143,7 @@ void ChannelContactModel::addContacts(const Tp::Contacts &contacts)
 
 void ChannelContactModel::removeContacts(const Tp::Contacts &contacts)
 {
-    foreach(Tp::ContactPtr contact, contacts) {
+    Q_FOREACH(Tp::ContactPtr contact, contacts) {
 
         //I think this is needed as technically the contact itself hasn't actually been deleted even if we remove our pointers to it
         //and could be used referenced elsewhere in the chat application in a different tab.
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index c88fa8c..526567c 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -271,7 +271,7 @@ KIcon ChatWidget::icon() const
         //normal chat - self and one other person.
         if (!d->isGroupChat) {
             //find the other contact which isn't self.
-            foreach(const Tp::ContactPtr & contact, d->channel->groupContacts()) {
+            Q_FOREACH(const Tp::ContactPtr & contact, d->channel->groupContacts()) {
                 if (contact != d->channel->groupSelfContact()) {
                     return iconForPresence(contact->presence().type());
                 }
@@ -377,7 +377,7 @@ QColor ChatWidget::titleColor() const
     //normal chat - self and one other person.
     if (!d->isGroupChat) {
         //find the other contact which isn't self.
-        foreach(const Tp::ContactPtr & contact, d->channel->groupContacts()) {
+        Q_FOREACH(const Tp::ContactPtr & contact, d->channel->groupContacts()) {
             if (contact != d->channel->groupSelfContact()) {
                 if (contact->presence().type() == Tp::ConnectionPresenceTypeOffline ||
                     contact->presence().type() == Tp::ConnectionPresenceTypeHidden) {
@@ -512,10 +512,10 @@ void ChatWidget::handleIncomingMessage(const Tp::ReceivedMessage &message)
             AdiumThemeContentInfo messageInfo(AdiumThemeMessageInfo::RemoteToLocal);
 
             //debug the message parts (looking for HTML etc)
-    //        foreach(Tp::MessagePart part, message.parts())
+    //        Q_FOREACH(Tp::MessagePart part, message.parts())
     //        {
     //            qDebug() << "***";
-    //            foreach(QString key, part.keys())
+    //            Q_FOREACH(QString key, part.keys())
     //            {
     //                qDebug() << key << part.value(key).variant();
     //            }
@@ -628,7 +628,7 @@ void ChatWidget::chatViewReady()
     d->chatviewlInitialised = true;
 
     //process any messages we've 'missed' whilst initialising.
-    foreach(const Tp::ReceivedMessage &message, d->channel->messageQueue()) {
+    Q_FOREACH(const Tp::ReceivedMessage &message, d->channel->messageQueue()) {
         handleIncomingMessage(message);
     }
 }
@@ -678,7 +678,7 @@ void ChatWidget::onChatStatusChanged(const Tp::ContactPtr & contact, Tp::Channel
     if (!contactIsTyping) {
         //In a multiperson chat just because this user is no longer typing it doesn't mean that no-one is.
         //loop through each contact, check no-one is in composing mode.
-        foreach (const Tp::ContactPtr & contact, d->channel->groupContacts()) {
+        Q_FOREACH (const Tp::ContactPtr & contact, d->channel->groupContacts()) {
             if (contact == d->channel->connection()->selfContact()) {
                 continue;
             }
diff --git a/lib/chat-window-style-manager.cpp b/lib/chat-window-style-manager.cpp
index 0bfedad..91e0696 100644
--- a/lib/chat-window-style-manager.cpp
+++ b/lib/chat-window-style-manager.cpp
@@ -87,7 +87,7 @@ void ChatWindowStyleManager::loadStyles()
 
     QStringList chatStyles = KGlobal::dirs()->findDirs("data", QLatin1String("ktelepathy/styles"));
 
-    foreach(const QString &styleDir, chatStyles) {
+    Q_FOREACH(const QString &styleDir, chatStyles) {
         kDebug() << styleDir;
         d->styleDirs.push(KUrl(styleDir));
     }
@@ -115,7 +115,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
    KStandardDirs::locateLocal("data", QLatin1String("ktelepathy/styles/"));
    QStringList chatStyles = KGlobal::dirs()->findDirs("data", QLatin1String("ktelepathy/styles"));
    // findDirs returns preferred paths first, let's check if one of them is writable
-   foreach(const QString& styleDir, chatStyles) {
+   Q_FOREACH(const QString& styleDir, chatStyles) {
         kDebug() << styleDir;
        if (QFileInfo(styleDir).isWritable()) {
            localStyleDir = styleDir;
@@ -293,7 +293,7 @@ bool ChatWindowStyleManager::removeStyle(const QString &styleId)
 
 //        // attempt to delete all dirs with this style
 //        int numDeleted = 0;
-//        foreach(const QString& stylePath, styleDirs) {
+//        Q_FOREACH(const QString& stylePath, styleDirs) {
 //            KUrl urlStyle(stylePath);
 //            // Do the actual deletion of the directory style.
 //            if (KIO::NetAccess::del(urlStyle, 0))
@@ -323,7 +323,7 @@ ChatWindowStyle *ChatWindowStyleManager::getValidStyleFromPool(const QString &st
 
     kDebug() << "Trying first valid style";
     // Try first valid style
-    foreach(const QString& name, d->availableStyles) {
+    Q_FOREACH(const QString& name, d->availableStyles) {
         style = getStyleFromPool(name);
         if (style) {
             return style;
@@ -367,7 +367,7 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &styleId
 
 void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList)
 {
-    foreach(const KFileItem &item, dirList) {
+    Q_FOREACH(const KFileItem &item, dirList) {
         // Ignore data dir(from deprecated XSLT themes)
         if (!item.url().fileName().contains(QLatin1String("data"))) {
             kDebug() << "Listing: " << item.url().fileName();

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list