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


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

The following commit has been merged in the master branch:
commit bece96e80761f6649c4248b72397ea8f5286b686
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sun Apr 14 22:59:21 2013 +0100

    Remove completely unused ConversationQueueManager
    
    REVIEW: 110017
---
 KTp/Declarative/CMakeLists.txt                 |   1 -
 KTp/Declarative/conversation-queue-manager.cpp | 103 -------------------------
 KTp/Declarative/conversation-queue-manager.h   |  64 ---------------
 KTp/Declarative/conversation.h                 |   1 -
 KTp/Declarative/messages-model.cpp             |   7 --
 KTp/Declarative/messages-model.h               |   8 +-
 tests/CMakeLists.txt                           |   1 -
 7 files changed, 1 insertion(+), 184 deletions(-)

diff --git a/KTp/Declarative/CMakeLists.txt b/KTp/Declarative/CMakeLists.txt
index d5b8984..ebe4c19 100644
--- a/KTp/Declarative/CMakeLists.txt
+++ b/KTp/Declarative/CMakeLists.txt
@@ -6,7 +6,6 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}
 set (ktp_qml_plugin_SRCS
     ${KTP_GLOBAL_SOURCES}
     contact-list.cpp
-    conversation-queue-manager.cpp
     conversation-target.cpp
     conversation.cpp
     conversations-model.cpp
diff --git a/KTp/Declarative/conversation-queue-manager.cpp b/KTp/Declarative/conversation-queue-manager.cpp
deleted file mode 100644
index 81a6ab2..0000000
--- a/KTp/Declarative/conversation-queue-manager.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-
-#include "conversation-queue-manager.h"
-#include <KDebug>
-
-class ConversationQueueManager::ConversationQueManagerPrivate
-{
-  public:
-    QList<Queueable*> queue;
-    KAction *gloablAction;
-};
-
-void Queueable::enqueueSelf()
-{
-    m_queueManager->enqueue(this);
-}
-
-void Queueable::removeSelfFromQueue()
-{
-    m_queueManager->remove(this);
-}
-
-Queueable::~Queueable()
-{
-}
-
-Queueable::Queueable(ConversationQueueManager *queue)
-    : m_queueManager(queue)
-{
-    if(!queue) {
-        m_queueManager = ConversationQueueManager::instance();
-    }
-}
-
-ConversationQueueManager *ConversationQueueManager::instance()
-{
-    static ConversationQueueManager *m_instance = 0;
-
-    if(!m_instance) {
-        m_instance = new ConversationQueueManager();
-    }
-
-    return m_instance;
-}
-
-ConversationQueueManager::ConversationQueueManager(QObject *parent):
-    QObject(parent),
-    d(new ConversationQueManagerPrivate)
-{
-    kDebug();
-
-    //FIXME: think of a good name for this. What did Kopete call it?
-    d->gloablAction = new KAction(this);
-    d->gloablAction->setObjectName(QLatin1String("next-unread-conversation"));
-    d->gloablAction->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_I)/*, KAction::ActiveShortcut | KAction::DefaultShortcut, KAction::NoAutoloading*/);
-
-    connect(d->gloablAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), SLOT(dequeueNext()));
-}
-
-void ConversationQueueManager::dequeueNext()
-{
-    kDebug();
-
-    if(!d->queue.isEmpty()) {
-        d->queue.takeLast()->selfDequeued();
-    }
-}
-
-void ConversationQueueManager::enqueue(Queueable *item)
-{
-    if(!d->queue.contains(item)) {
-        d->queue.append(item);
-    }
-}
-
-void ConversationQueueManager::remove(Queueable *item)
-{
-    if(d->queue.contains(item)) {
-        d->queue.removeAll(item);
-    }
-}
-
-ConversationQueueManager::~ConversationQueueManager()
-{
-    delete d;
-}
diff --git a/KTp/Declarative/conversation-queue-manager.h b/KTp/Declarative/conversation-queue-manager.h
deleted file mode 100644
index 62dbebf..0000000
--- a/KTp/Declarative/conversation-queue-manager.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-
-#ifndef CONVERSATION_QUEUE_MANAGER_H
-#define CONVERSATION_QUEUE_MANAGER_H
-
-#include <QtCore/QObject>
-#include <KAction>
-
-class ConversationQueueManager;
-class Queueable
-{
-  friend class ConversationQueueManager;
-
-  protected:
-    Queueable(ConversationQueueManager *queue = 0);
-    virtual ~Queueable();
-
-    void enqueueSelf();
-    void removeSelfFromQueue();
-    virtual void selfDequeued() = 0;
-
-  private:
-    ConversationQueueManager *m_queueManager;
-};
-
-
-class ConversationQueueManager : public QObject
-{
-    Q_OBJECT
-
-  public:
-    static ConversationQueueManager* instance();
-    void enqueue(Queueable *item);
-    void remove(Queueable *item);
-
-  public Q_SLOTS:
-    void dequeueNext();
-
-  private:
-    explicit ConversationQueueManager(QObject *parent = 0);
-    virtual ~ConversationQueueManager();
-
-    class ConversationQueManagerPrivate;
-    ConversationQueManagerPrivate *d;
-};
-
-#endif // CONVERSATION_QUEUE_MANAGER_H
diff --git a/KTp/Declarative/conversation.h b/KTp/Declarative/conversation.h
index 09263ee..6fc8903 100644
--- a/KTp/Declarative/conversation.h
+++ b/KTp/Declarative/conversation.h
@@ -26,7 +26,6 @@
 
 #include <KIcon>
 
-#include "conversation-queue-manager.h"
 #include "conversation-target.h"
 #include "messages-model.h"
 
diff --git a/KTp/Declarative/messages-model.cpp b/KTp/Declarative/messages-model.cpp
index 6889e3a..8078241 100644
--- a/KTp/Declarative/messages-model.cpp
+++ b/KTp/Declarative/messages-model.cpp
@@ -137,7 +137,6 @@ void MessagesModel::onMessageReceived(const Tp::ReceivedMessage &message)
         if (d->visible) {
             acknowledgeAllMessages();
         } else {
-            enqueueSelf();
             Q_EMIT unreadCountChanged(unreadCount);
         }
     }
@@ -262,15 +261,9 @@ void MessagesModel::acknowledgeAllMessages()
     kDebug() << "Conversation Visible, Acknowledging " << queue.size() << " messages.";
 
     d->textChannel->acknowledge(queue);
-    removeSelfFromQueue();
     Q_EMIT unreadCountChanged(queue.size());
 }
 
-void MessagesModel::selfDequeued()
-{
-    Q_EMIT popoutRequested();
-}
-
 void MessagesModel::setVisibleToUser(bool visible)
 {
     kDebug() << visible;
diff --git a/KTp/Declarative/messages-model.h b/KTp/Declarative/messages-model.h
index 57f67c3..cffaf15 100644
--- a/KTp/Declarative/messages-model.h
+++ b/KTp/Declarative/messages-model.h
@@ -25,10 +25,7 @@
 #include <TelepathyQt/Types>
 #include <TelepathyQt/ReceivedMessage>
 
-#include "conversation-queue-manager.h"
-
-
-class MessagesModel : public QAbstractListModel, public Queueable
+class MessagesModel : public QAbstractListModel
 {
     Q_OBJECT
     Q_ENUMS(MessageType)
@@ -72,9 +69,7 @@ class MessagesModel : public QAbstractListModel, public Queueable
 
   Q_SIGNALS:
     void visibleToUserChanged(bool visible);
-
     void unreadCountChanged(int unreadMesssagesCount);
-    void popoutRequested();
 
   public Q_SLOTS:
     void sendNewMessage(const QString &message);
@@ -88,7 +83,6 @@ class MessagesModel : public QAbstractListModel, public Queueable
   private:
     void setupChannelSignals(const Tp::TextChannelPtr &channel);
     void removeChannelSignals(const Tp::TextChannelPtr &channel);
-    virtual void selfDequeued();
 
     class MessagesModelPrivate;
     MessagesModelPrivate *d;
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index bbd06e7..20d6aea 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -40,7 +40,6 @@ kde4_add_executable(ktp_pinned-contact_list_model_view
     ../KTp/Declarative/conversation-target.cpp
     ../KTp/Declarative/contact-pin.cpp
     ../KTp/Declarative/messages-model.cpp
-    ../KTp/Declarative/conversation-queue-manager.cpp
     ../KTp/Declarative/conversation.cpp
 )
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list