[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:08:08 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=f1e0d48
The following commit has been merged in the master branch:
commit f1e0d486612e7edd1b920efc01a980a7d208cc7c
Author: Dario Freddi <dario.freddi at collabora.com>
Date: Mon Nov 21 21:38:09 2011 +0100
Port to new KTelepathy internal library
---
CMakeLists.txt | 29 +++++------------------------
abstract-contact-delegate.cpp | 7 ++++---
avatar-button.cpp | 6 ++++--
cmake/modules/FindKTelepathy.cmake | 34 ++++++++++++++++------------------
contact-delegate-compact.cpp | 10 +++++-----
contact-delegate.cpp | 10 +++++-----
contact-overlays.cpp | 4 ++--
dialogs/add-contact-dialog.cpp | 4 ++--
dialogs/contact-info.cpp | 4 ++--
dialogs/join-chat-room-dialog.cpp | 2 +-
global-presence-chooser.cpp | 20 +++++++++++---------
global-presence-chooser.h | 7 +++++--
main-widget.cpp | 17 +++++++++--------
presence-model.cpp | 6 +++---
presence-model.h | 4 ++--
15 files changed, 76 insertions(+), 88 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3cfe27..68dc90c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,9 +5,11 @@ set (CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
)
+set(IS_TELEPATHY_KDE_INTERNAL_MODULE TRUE)
set(KDE_MIN_VERSION "4.4.75")
find_package (KDE4 4.4.75 REQUIRED)
find_package (TelepathyQt4 0.7.3 REQUIRED)
+find_package (KTelepathy REQUIRED)
include (KDE4Defaults)
include (MacroLibrary)
@@ -17,21 +19,10 @@ add_definitions (${KDE4_DEFINITIONS}
include_directories (${KDE4_INCLUDES}
${TELEPATHY_QT4_INCLUDE_DIR}
+ ${KTELEPATHY_INCLUDE_DIR}
)
-
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.gitmodules)
-execute_process(COMMAND git submodule init
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-execute_process(COMMAND git submodule update
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.gitmodules)
-
-
set (contactlist_SRCS
avatar-button.cpp
abstract-contact-delegate.cpp
@@ -53,18 +44,6 @@ set (contactlist_SRCS
dialogs/remove-contact-dialog.cpp
dialogs/contact-info.cpp
dialogs/custom-presence-dialog.cpp
- common/models/accounts-filter-model.cpp
- common/models/contact-model-item.cpp
- common/models/accounts-model-item.cpp
- common/models/tree-node.cpp
- common/models/accounts-model.cpp
- common/models/groups-model-item.cpp
- common/models/groups-model.cpp
- common/models/proxy-tree-node.cpp
- common/service-availability-checker.cpp
- common/global-presence.cpp
- common/kpresence.cpp
- common/text-parser.cpp
presence-model.cpp
)
@@ -85,6 +64,8 @@ kde4_add_executable (telepathy-kde-contactlist
target_link_libraries (telepathy-kde-contactlist
${TELEPATHY_QT4_LIBRARIES}
+ ${KTELEPATHY_LIBRARIES}
+ ${KTELEPATHY_MODELS_LIBRARIES}
${KDE4_KDEUI_LIBS}
${KDE4_KIO_LIBS}
${KDE4_KCMUTILS_LIBS}
diff --git a/abstract-contact-delegate.cpp b/abstract-contact-delegate.cpp
index 7b01a57..2bd0f55 100644
--- a/abstract-contact-delegate.cpp
+++ b/abstract-contact-delegate.cpp
@@ -32,9 +32,10 @@
#include <KDE/KIconLoader>
#include <KDE/KIcon>
-#include "common/models/accounts-model.h"
-#include "common/models/groups-model.h"
-#include "common/models/contact-model-item.h"
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/accounts-model-item.h>
+#include <KTelepathy/Models/groups-model.h>
+#include <KTelepathy/Models/contact-model-item.h>
const int SPACING = 2;
const int ACCOUNT_ICON_SIZE = 13;
diff --git a/avatar-button.cpp b/avatar-button.cpp
index b631c78..539ce43 100644
--- a/avatar-button.cpp
+++ b/avatar-button.cpp
@@ -29,7 +29,9 @@
#include <KLocalizedString>
#include <KSharedConfig>
-#include "common/models/accounts-model.h"
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/accounts-model-item.h>
+
#include "fetch-avatar-job.h"
AvatarButton::AvatarButton(QWidget *parent)
@@ -224,4 +226,4 @@ void AvatarButton::onAvatarFetched(KJob *job)
avatarGroup.writeEntry("source", m_accountManager->allAccounts().first()->uniqueIdentifier());
avatarGroup.config()->sync();
}
-}
\ No newline at end of file
+}
diff --git a/cmake/modules/FindKTelepathy.cmake b/cmake/modules/FindKTelepathy.cmake
index 3f34148..4a0e704 100644
--- a/cmake/modules/FindKTelepathy.cmake
+++ b/cmake/modules/FindKTelepathy.cmake
@@ -1,14 +1,18 @@
# Try to find the KTelepathy library
-# KTELEPATHY_FOUND - system has libkcmtelepathyaccounts
-# KTELEPATHY_INCLUDE_DIR - the kcmtelepathyaccounts include directory
-# KTELEPATHY_LIBRARIES - Link these to use libkcmtelepathyaccounts
+# KTELEPATHY_FOUND
+# KTELEPATHY_INCLUDE_DIR
+# KTELEPATHY_LIBRARIES
+# KTELEPATHY_MODELS_LIBRARIES
-# Copyright (c) 2008, Allen Winter <winter at kde.org>
-# Copyright (c) 2010, Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
+# Copyright (c) 2011, Dario Freddi <drf at kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+if (NOT IS_TELEPATHY_KDE_INTERNAL_MODULE)
+ message (FATAL_ERROR "KTelepathy can be used just from internal components at this time")
+endif (NOT IS_TELEPATHY_KDE_INTERNAL_MODULE)
+
SET (KTELEPATHY_FIND_REQUIRED ${KTelepathy_FIND_REQUIRED})
if (KTELEPATHY_INCLUDE_DIRS AND KTELEPATHY_LIBRARIES)
# Already in cache, be silent
@@ -16,24 +20,18 @@ if (KTELEPATHY_INCLUDE_DIRS AND KTELEPATHY_LIBRARIES)
endif (KTELEPATHY_INCLUDE_DIRS AND KTELEPATHY_LIBRARIES)
find_path(KTELEPATHY_INCLUDE_DIR
- NAMES abstract-tree-item.h
+ NAMES KTelepathy/presence.h
PATHS ${KDE4_INCLUDE_DIR}
- PATH_SUFFIXES ktelepathy
+ PATH_SUFFIXES telepathy-1.0
)
-find_path(KTELEPATHY_INCLUDE_DIRS
- NAMES KTelepathy/AbstractTreeItem
- PATHS ${KDE4_INCLUDE_DIR}
- PATH_SUFFIXES KDE
-)
-
-set(KTELEPATHY_INCLUDE_DIRS ${KTELEPATHY_INCLUDE_DIRS} ${KTELEPATHY_INCLUDE_DIR})
-
-find_library(KTELEPATHY_LIBRARIES NAMES ktelepathy )
+find_library(KTELEPATHY_LIBRARIES NAMES telepathykdecommoninternalsprivate )
+find_library(KTELEPATHY_MODELS_LIBRARIES NAMES telepathykdemodelsprivate )
include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(KTELEPATHY DEFAULT_MSG
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(KTelepathy DEFAULT_MSG
KTELEPATHY_LIBRARIES
- KTELEPATHY_INCLUDE_DIRS)
+ KTELEPATHY_MODELS_LIBRARIES
+ KTELEPATHY_INCLUDE_DIR)
mark_as_advanced(KTELEPATHY_INCLUDE_DIRS KTELEPATHY_LIBRARIES)
diff --git a/contact-delegate-compact.cpp b/contact-delegate-compact.cpp
index 5d399e9..265a295 100644
--- a/contact-delegate-compact.cpp
+++ b/contact-delegate-compact.cpp
@@ -33,11 +33,11 @@
#include <KGlobalSettings>
#include <KDE/KLocale>
-#include "common/models/accounts-model.h"
-#include "common/models/contact-model-item.h"
-#include "common/models/proxy-tree-node.h"
-#include "common/models/groups-model-item.h"
-#include "common/models/groups-model.h"
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/contact-model-item.h>
+#include <KTelepathy/Models/proxy-tree-node.h>
+#include <KTelepathy/Models/groups-model-item.h>
+#include <KTelepathy/Models/groups-model.h>
const int SPACING = 4;
const int AVATAR_SIZE = 22;
diff --git a/contact-delegate.cpp b/contact-delegate.cpp
index 7d1218d..c3badef 100644
--- a/contact-delegate.cpp
+++ b/contact-delegate.cpp
@@ -33,11 +33,11 @@
#include <KGlobalSettings>
#include <KDE/KLocale>
-#include "common/models/accounts-model.h"
-#include "common/models/contact-model-item.h"
-#include "common/models/proxy-tree-node.h"
-#include "common/models/groups-model-item.h"
-#include "common/models/groups-model.h"
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/contact-model-item.h>
+#include <KTelepathy/Models/proxy-tree-node.h>
+#include <KTelepathy/Models/groups-model-item.h>
+#include <KTelepathy/Models/groups-model.h>
const int SPACING = 4;
const int AVATAR_SIZE = 32;
diff --git a/contact-overlays.cpp b/contact-overlays.cpp
index b72904e..8eea7a7 100644
--- a/contact-overlays.cpp
+++ b/contact-overlays.cpp
@@ -25,8 +25,8 @@
#include <KIconLoader>
#include <KDebug>
-#include "common/models/accounts-model.h"
-#include "common/models/contact-model-item.h"
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/contact-model-item.h>
class GuiItemContactViewHoverButton : public ContactViewHoverButton
{
diff --git a/dialogs/add-contact-dialog.cpp b/dialogs/add-contact-dialog.cpp
index 5acb3ed..257da2c 100644
--- a/dialogs/add-contact-dialog.cpp
+++ b/dialogs/add-contact-dialog.cpp
@@ -21,8 +21,8 @@
#include "add-contact-dialog.h"
#include "ui_add-contact-dialog.h"
-#include "common/models/accounts-model.h"
-#include "common/models/accounts-model-item.h"
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/accounts-model-item.h>
#include <QObject>
#include <QSortFilterProxyModel>
diff --git a/dialogs/contact-info.cpp b/dialogs/contact-info.cpp
index 9789050..7525bcf 100644
--- a/dialogs/contact-info.cpp
+++ b/dialogs/contact-info.cpp
@@ -28,7 +28,7 @@
#include <KProtocolInfo>
-#include "common/text-parser.h"
+#include <KTelepathy/text-parser.h>
#include <KDebug>
ContactInfo::ContactInfo(const Tp::ContactPtr &contact, QWidget *parent) :
@@ -55,7 +55,7 @@ ContactInfo::ContactInfo(const Tp::ContactPtr &contact, QWidget *parent) :
QString presenceMessage = contact->presence().statusMessage();
- TextUrlData urls = TextParser::instance()->extractUrlData(presenceMessage);
+ KTp::TextUrlData urls = KTp::TextParser::instance()->extractUrlData(presenceMessage);
int offset = 0;
for (int i = 0; i < urls.fixedUrls.size(); i++) {
diff --git a/dialogs/join-chat-room-dialog.cpp b/dialogs/join-chat-room-dialog.cpp
index edf575a..5e9dcc3 100644
--- a/dialogs/join-chat-room-dialog.cpp
+++ b/dialogs/join-chat-room-dialog.cpp
@@ -21,7 +21,7 @@
#include "join-chat-room-dialog.h"
#include "ui_join-chat-room-dialog.h"
-#include "common/models/accounts-model.h"
+#include <KTelepathy/Models/accounts-model.h>
#include <KDE/KPushButton>
diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 14d52bc..5af115d 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -22,7 +22,9 @@
#include "presence-model.h"
-#include "common/global-presence.h"
+#include <KTelepathy/global-presence.h>
+#include <KTelepathy/presence.h>
+
#include "dialogs/custom-presence-dialog.h"
#include <KIcon>
@@ -49,15 +51,15 @@ public:
PresenceModelExtended(PresenceModel *presenceModel, QObject *parent);
int rowCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
- KPresence temporaryPresence() const;
+ KTp::Presence temporaryPresence() const;
/** Adds a presence to the model which is to be used when the presence has been set externally and we need to show it, but not save it to the config*/
- QModelIndex addTemporaryPresence(const KPresence &presence);
+ QModelIndex addTemporaryPresence(const KTp::Presence &presence);
void removeTemporaryPresence();
private slots:
void sourceRowsInserted(const QModelIndex &index, int start, int end);
void sourceRowsRemoved(const QModelIndex &index, int start, int end);
private:
- KPresence m_temporaryPresence;
+ KTp::Presence m_temporaryPresence;
PresenceModel *m_model;
};
@@ -114,7 +116,7 @@ QVariant PresenceModelExtended::data(const QModelIndex &index, int role) const
return QVariant();
}
-KPresence PresenceModelExtended::temporaryPresence() const
+KTp::Presence PresenceModelExtended::temporaryPresence() const
{
return m_temporaryPresence;
}
@@ -131,7 +133,7 @@ void PresenceModelExtended::sourceRowsRemoved(const QModelIndex &index, int star
endRemoveRows();
}
-QModelIndex PresenceModelExtended::addTemporaryPresence(const KPresence &presence)
+QModelIndex PresenceModelExtended::addTemporaryPresence(const KTp::Presence &presence)
{
if (! presence.isValid()) {
removeTemporaryPresence();
@@ -152,7 +154,7 @@ void PresenceModelExtended::removeTemporaryPresence()
int row = m_model->rowCount(QModelIndex());
beginRemoveRows(QModelIndex(),row, row);
- m_temporaryPresence = KPresence();
+ m_temporaryPresence = KTp::Presence();
endRemoveRows();
}
@@ -160,7 +162,7 @@ void PresenceModelExtended::removeTemporaryPresence()
GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
KComboBox(parent),
- m_globalPresence(new GlobalPresence(this)),
+ m_globalPresence(new KTp::GlobalPresence(this)),
m_model(new PresenceModel(this)),
m_modelExtended(new PresenceModelExtended(m_model, this))
{
@@ -201,7 +203,7 @@ bool GlobalPresenceChooser::event(QEvent *e)
Q_FOREACH(const Tp::AccountPtr &account, m_accountManager->allAccounts()) {
if (account->isEnabled()) {
- KPresence accountPresence(account->currentPresence());
+ KTp::Presence accountPresence(account->currentPresence());
QString presenceIconPath = KIconLoader::global()->iconPath(accountPresence.icon().name(), 1);
QString presenceIconString = QString::fromLatin1("<img src=\"%1\">").arg(presenceIconPath);
QString accountIconPath = KIconLoader::global()->iconPath(account->iconName(), 1);
diff --git a/global-presence-chooser.h b/global-presence-chooser.h
index f0eb623..3fa0e1a 100644
--- a/global-presence-chooser.h
+++ b/global-presence-chooser.h
@@ -26,10 +26,13 @@
#include <TelepathyQt4/AccountManager>
class KPixmapSequenceOverlayPainter;
-class GlobalPresence;
class PresenceModel;
class PresenceModelExtended;
+namespace KTp {
+class GlobalPresence;
+}
+
class GlobalPresenceChooser : public KComboBox
{
Q_OBJECT
@@ -48,7 +51,7 @@ private slots:
void onPresenceChanging(bool isChanging);
private:
- GlobalPresence *m_globalPresence;
+ KTp::GlobalPresence *m_globalPresence;
PresenceModel *m_model;
PresenceModelExtended *m_modelExtended;
diff --git a/main-widget.cpp b/main-widget.cpp
index c7b40ae..7f0adf1 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -70,13 +70,14 @@
#include "dialogs/remove-contact-dialog.h"
#include "dialogs/contact-info.h"
-#include "common/models/groups-model.h"
-#include "common/models/contact-model-item.h"
-#include "common/models/groups-model-item.h"
-#include "common/models/accounts-model.h"
-#include "common/models/accounts-filter-model.h"
-#include "common/models/proxy-tree-node.h"
-#include "common/text-parser.h"
+#include <KTelepathy/Models/groups-model.h>
+#include <KTelepathy/Models/contact-model-item.h>
+#include <KTelepathy/Models/groups-model-item.h>
+#include <KTelepathy/Models/accounts-model.h>
+#include <KTelepathy/Models/accounts-model-item.h>
+#include <KTelepathy/Models/accounts-filter-model.h>
+#include <KTelepathy/Models/proxy-tree-node.h>
+#include <KTelepathy/text-parser.h>
#define PREFERRED_TEXTCHAT_HANDLER "org.freedesktop.Telepathy.Client.KDE.TextUi"
#define PREFERRED_FILETRANSFER_HANDLER "org.freedesktop.Telepathy.Client.KDE.FileTransfer"
@@ -1298,7 +1299,7 @@ QStringList MainWidget::extractLinksFromIndex(const QModelIndex& index)
if (presenceMsg.isEmpty()) {
return QStringList();
} else {
- TextUrlData urls = TextParser::instance()->extractUrlData(presenceMsg);
+ KTp::TextUrlData urls = KTp::TextParser::instance()->extractUrlData(presenceMsg);
return urls.fixedUrls;
}
}
diff --git a/presence-model.cpp b/presence-model.cpp
index 2efbe12..946e106 100644
--- a/presence-model.cpp
+++ b/presence-model.cpp
@@ -41,7 +41,7 @@ PresenceModel::PresenceModel(QObject *parent) :
PresenceModel::~PresenceModel()
{
- Q_FOREACH(const KPresence &presence, m_presences) {
+ Q_FOREACH(const KTp::Presence &presence, m_presences) {
if (!presence.statusMessage().isEmpty()) {
QVariantList presenceVariant;
presenceVariant.append(presence.type());
@@ -55,7 +55,7 @@ PresenceModel::~PresenceModel()
QVariant PresenceModel::data(const QModelIndex &index, int role) const
{
- KPresence presence = m_presences[index.row()];
+ KTp::Presence presence = m_presences[index.row()];
switch (role) {
case Qt::DisplayRole:
if (presence.statusMessage().isEmpty()) {
@@ -127,7 +127,7 @@ QModelIndex PresenceModel::addPresence(const Tp::Presence &presence)
return createIndex(m_presences.indexOf(presence),0);
}
- QList<KPresence>::iterator i = qLowerBound(m_presences.begin(), m_presences.end(), KPresence(presence));
+ QList<KTp::Presence>::iterator i = qLowerBound(m_presences.begin(), m_presences.end(), KTp::Presence(presence));
m_presences.insert(i, presence);
int index = m_presences.indexOf(presence);
diff --git a/presence-model.h b/presence-model.h
index 3ddef47..7dc3bc3 100644
--- a/presence-model.h
+++ b/presence-model.h
@@ -21,7 +21,7 @@
#ifndef PRESENCEMODEL_H
#define PRESENCEMODEL_H
-#include "common/kpresence.h"
+#include <KTelepathy/presence.h>
#include <QAbstractListModel>
@@ -62,7 +62,7 @@ private:
/** Loads any user custom presences into the model*/
void loadCustomPresences();
- QList<KPresence> m_presences;
+ QList<KTp::Presence> m_presences;
//this is wrong, KConfigGroup is a sharedptr..
KConfigGroup m_presenceGroup;
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list