[SCM] ktp-approver packaging branch, master, updated. debian/15.12.1-1-299-g62cbbd7
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 09:13:08 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-approver.git;a=commitdiff;h=6b67a7c
The following commit has been merged in the master branch:
commit 6b67a7c494fe965213fb974d32606beba62da9d7
Author: George Kiagiadakis <george.kiagiadakis at collabora.co.uk>
Date: Thu Jan 27 15:53:25 2011 +0200
Remove the contact upgrade hack, since tp-qt4 >= 0.5.3 implements contact factories.
---
CMakeLists.txt | 2 +-
src/textchannelapprover.cpp | 34 +---------------------------------
src/textchannelapprover.h | 19 -------------------
3 files changed, 2 insertions(+), 53 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0a1606..2f9a6c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project(telepathy_kde_approver)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
find_package(KDE4 REQUIRED)
-find_package(TelepathyQt4 0.5.0 REQUIRED)
+find_package(TelepathyQt4 0.5.3 REQUIRED)
include_directories(${KDE4_INCLUDES} ${TELEPATHY_QT4_INCLUDE_DIR})
add_definitions(${KDE4_DEFINITIONS})
diff --git a/src/textchannelapprover.cpp b/src/textchannelapprover.cpp
index 0ec5ea8..a30a763 100644
--- a/src/textchannelapprover.cpp
+++ b/src/textchannelapprover.cpp
@@ -54,18 +54,11 @@ TextChannelApprover::~TextChannelApprover()
void TextChannelApprover::onMessageReceived(const Tp::ReceivedMessage & msg)
{
- Tp::ContactPtr sender = msg.sender();
- if (sender && (!sender->actualFeatures().contains(Tp::Contact::FeatureAlias) ||
- !sender->actualFeatures().contains(Tp::Contact::FeatureAvatarData)))
- {
- new MessageReceivedContactUpgrader(msg, this);
- return;
- }
-
if (!m_notification) {
m_notification = new KNotification("new_text_message");
m_notification.data()->setComponentData(TpKDEApproverFactory::componentData());
+ Tp::ContactPtr sender = msg.sender();
if (sender) {
m_notification.data()->setTitle(sender->alias());
@@ -118,29 +111,4 @@ void TextChannelApprover::updateNotifierItemTooltip()
QString());
}
-
-MessageReceivedContactUpgrader::MessageReceivedContactUpgrader(const Tp::ReceivedMessage & msg,
- TextChannelApprover *parent)
- : QObject(parent), m_msg(msg), m_parent(parent)
-{
- Tp::PendingContacts *pc = msg.sender()->manager()->upgradeContacts(
- QList<Tp::ContactPtr>() << msg.sender(),
- Tp::Features() << Tp::Contact::FeatureAlias << Tp::Contact::FeatureAvatarData
- );
-
- connect(pc, SIGNAL(finished(Tp::PendingOperation*)),
- SLOT(onUpgradeContactsFinished(Tp::PendingOperation*)));
-}
-
-void MessageReceivedContactUpgrader::onUpgradeContactsFinished(Tp::PendingOperation *operation)
-{
- if (operation->isError()) {
- kError() << "Could not upgrade contact" << operation->errorName()
- << operation->errorMessage();
- } else {
- m_parent->onMessageReceived(m_msg);
- }
- deleteLater();
-}
-
#include "textchannelapprover.moc"
diff --git a/src/textchannelapprover.h b/src/textchannelapprover.h
index ce57c5b..b6301f7 100644
--- a/src/textchannelapprover.h
+++ b/src/textchannelapprover.h
@@ -43,25 +43,6 @@ private:
QWeakPointer<KNotification> m_notification;
QSharedPointer<KStatusNotifierItem> m_notifierItem;
-
- friend class MessageReceivedContactUpgrader;
-};
-
-
-/* This code is a temporary solution until tp-qt4 implements contact factories */
-class MessageReceivedContactUpgrader : public QObject
-{
- Q_OBJECT
-public:
- explicit MessageReceivedContactUpgrader(const Tp::ReceivedMessage & msg,
- TextChannelApprover *parent);
-
-private Q_SLOTS:
- void onUpgradeContactsFinished(Tp::PendingOperation *operation);
-
-private:
- Tp::ReceivedMessage m_msg;
- TextChannelApprover *m_parent;
};
#endif //TEXTCHANNELAPPROVER_H
--
ktp-approver packaging
More information about the pkg-kde-commits
mailing list