[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:16:17 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=167e4b1
The following commit has been merged in the master branch:
commit 167e4b1b9537306220bccc65de5a763585ca6d6d
Author: Dan Vrátil <dvratil at redhat.com>
Date: Mon Jan 7 23:51:54 2013 +0100
Move declarative-plugin to ktp-common-internals
---
declarative-plugin/CMakeLists.txt | 26 --------
declarative-plugin/contact-list.cpp | 116 ------------------------------------
declarative-plugin/contact-list.h | 57 ------------------
declarative-plugin/qml-plugin.cpp | 34 -----------
declarative-plugin/qml-plugin.h | 31 ----------
declarative-plugin/qmldir | 1 -
6 files changed, 265 deletions(-)
diff --git a/declarative-plugin/CMakeLists.txt b/declarative-plugin/CMakeLists.txt
deleted file mode 100644
index 86a7a27..0000000
--- a/declarative-plugin/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-include_directories(
- ${CMAKE_SOURCE_DIR}
- ${CMAKE_BINARY_DIR}
- ${KDE4_INCLUDES}
- ${TELEPATHY_QT4_INCLUDE_DIR}
-)
-
-set(ktpcontactlistqmlplugin_SRCS
- qml-plugin.cpp
- contact-list.cpp
- )
-
-kde4_add_library(ktpcontactlistqmlplugin SHARED ${ktpcontactlistqmlplugin_SRCS})
-
-target_link_libraries(ktpcontactlistqmlplugin
- ${KDE4_KDECORE_LIBS}
- ${QT_QTSCRIPT_LIBRARY}
- ${QT_QTDECLARATIVE_LIBRARY}
- ${TELEPATHY_QT4_LIBRARIES}
- ${KTP_MODELS_LIBRARIES}
- ${KTP_LIBRARIES}
- ${KDE4_KDEUI_LIBS}
-)
-
-install(TARGETS ktpcontactlistqmlplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/telepathy/contactlist)
-install(FILES qmldir DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/telepathy/contactlist)
diff --git a/declarative-plugin/contact-list.cpp b/declarative-plugin/contact-list.cpp
deleted file mode 100644
index 52ee06b..0000000
--- a/declarative-plugin/contact-list.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- Copyright (C) 2011 David Edmundson <kde at davidedmundson.co.uk>
-
- 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 "contact-list.h"
-
-#include <TelepathyQt/AccountFactory>
-#include <TelepathyQt/ContactFactory>
-#include <TelepathyQt/ConnectionFactory>
-#include <TelepathyQt/AccountManager>
-#include <TelepathyQt/PendingReady>
-#include <TelepathyQt/PendingChannelRequest>
-
-#include <KDebug>
-
-#include <KTp/Models/contact-model-item.h>
-#include <KTp/Models/accounts-model-item.h>
-#include <KTp/actions.h>
-
-ContactList::ContactList(QObject *parent)
- : QObject(parent),
- m_contactsModel(new ContactsModel(this)),
- m_filterModel(new AccountsFilterModel(this)),
- m_flatModel(0)
-{
- m_filterModel->setSourceModel(m_contactsModel);
- //flat model takes the source as a constructor parameter, the other's don't.
- //due to a bug somewhere creating the flat model proxy with the filter model as a source before the filter model has a source means the rolenames do not get propgated up
- m_flatModel = new FlatModelProxy(m_filterModel);
-
- Tp::registerTypes();
-
- // Start setting up the Telepathy AccountManager.
- Tp::AccountFactoryPtr accountFactory = Tp::AccountFactory::create(QDBusConnection::sessionBus(),
- Tp::Features() << Tp::Account::FeatureCore
- << Tp::Account::FeatureAvatar
- << Tp::Account::FeatureCapabilities
- << Tp::Account::FeatureProtocolInfo
- << Tp::Account::FeatureProfile);
-
- Tp::ConnectionFactoryPtr connectionFactory = Tp::ConnectionFactory::create(QDBusConnection::sessionBus(),
- Tp::Features() << Tp::Connection::FeatureCore
- << Tp::Connection::FeatureRosterGroups
- << Tp::Connection::FeatureRoster
- << Tp::Connection::FeatureSelfContact);
-
- Tp::ContactFactoryPtr contactFactory = Tp::ContactFactory::create(Tp::Features() << Tp::Contact::FeatureAlias
- << Tp::Contact::FeatureAvatarData
- << Tp::Contact::FeatureSimplePresence
- << Tp::Contact::FeatureCapabilities);
-
-
-
- Tp::ChannelFactoryPtr channelFactory = Tp::ChannelFactory::create(QDBusConnection::sessionBus());
-
- m_accountManager = Tp::AccountManager::create(QDBusConnection::sessionBus(),
- accountFactory,
- connectionFactory,
- channelFactory,
- contactFactory);
-
- m_filterModel->setDynamicSortFilter(true);
-
- connect(m_accountManager->becomeReady(),
- SIGNAL(finished(Tp::PendingOperation*)),
- SLOT(onAccountManagerReady(Tp::PendingOperation*)));
-}
-
-
-void ContactList::onAccountManagerReady(Tp::PendingOperation *op)
-{
- Q_UNUSED(op);
- m_contactsModel->setAccountManager(m_accountManager);
-}
-
-FlatModelProxy * ContactList::flatModel() const
-{
- return m_flatModel;
-}
-
-AccountsFilterModel * ContactList::filterModel() const
-{
- return m_filterModel;
-}
-
-void ContactList::startChat(const Tp::AccountPtr &account, const Tp::ContactPtr &contact)
-{
- kDebug() << "Requesting chat for contact" << contact->alias();
- kDebug() << "account is" << account->normalizedName();
-
- Tp::PendingOperation *op = KTp::Actions::startChat(account, contact, true);
- connect(op, SIGNAL(finished(Tp::PendingOperation*)), SLOT(onGenericOperationFinished(Tp::PendingOperation*)));
-}
-
-void ContactList::onGenericOperationFinished(Tp::PendingOperation *op)
-{
- if (op->isError()) {
- kDebug() << op->errorName();
- kDebug() << op->errorMessage();
- }
-}
-
diff --git a/declarative-plugin/contact-list.h b/declarative-plugin/contact-list.h
deleted file mode 100644
index 1356d0b..0000000
--- a/declarative-plugin/contact-list.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- Copyright (C) 2011 David Edmundson <kde at davidedmundson.co.uk>
-
- 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 CONTACT_LIST_H
-#define CONTACT_LIST_H
-
-#include <KTp/Models/contacts-model.h>
-#include <KTp/Models/flat-model-proxy.h>
-#include <KTp/Models/accounts-filter-model.h>
-
-
-#include <TelepathyQt/Types>
-
-/** Exposes general contact list stuff to QML*/
-class ContactList : public QObject
-{
- Q_OBJECT
-public:
- Q_PROPERTY(QObject* model READ flatModel CONSTANT)
- Q_PROPERTY(QObject* filter READ filterModel CONSTANT)
-
-
- ContactList(QObject *parent=0);
- FlatModelProxy* flatModel() const;
- AccountsFilterModel* filterModel() const;
-
-
-public slots:
- void startChat(const Tp::AccountPtr &account, const Tp::ContactPtr &contact);
-
-private slots:
- void onAccountManagerReady(Tp::PendingOperation *op);
- void onGenericOperationFinished(Tp::PendingOperation *op);
-
-private:
- ContactsModel* m_contactsModel;
- AccountsFilterModel* m_filterModel;
- FlatModelProxy* m_flatModel;
- Tp::AccountManagerPtr m_accountManager;
-};
-
-#endif
diff --git a/declarative-plugin/qml-plugin.cpp b/declarative-plugin/qml-plugin.cpp
deleted file mode 100644
index ffc0c01..0000000
--- a/declarative-plugin/qml-plugin.cpp
+++ /dev/null
@@ -1,34 +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 "qml-plugin.h"
-
-#include <QtDeclarative/QDeclarativeItem>
-
-#include "contact-list.h"
-
-void QmlPlugin::registerTypes(const char *uri)
-{
- // this can be used in QML because it spits out Conversations which
- // can be given to ChatWidget.qml
- qmlRegisterType<ContactList> (uri, 0, 1, "ContactList");
- qmlRegisterUncreatableType<AccountsFilterModel> (uri, 0, 1, "AccountsFilterModel", "Filter cannot be created. Access through ContactList.filter");
-}
-
-Q_EXPORT_PLUGIN2(contactlist, QmlPlugin);
diff --git a/declarative-plugin/qml-plugin.h b/declarative-plugin/qml-plugin.h
deleted file mode 100644
index ad56781..0000000
--- a/declarative-plugin/qml-plugin.h
+++ /dev/null
@@ -1,31 +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 QML_PLUGIN_H
-#define QML_PLUGIN_H
-
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-
-class QmlPlugin : public QDeclarativeExtensionPlugin
-{
-public:
- virtual void registerTypes(const char *uri);
-};
-
-#endif // QML_PLUGINS_H
diff --git a/declarative-plugin/qmldir b/declarative-plugin/qmldir
deleted file mode 100644
index b1178c8..0000000
--- a/declarative-plugin/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin ktpcontactlistqmlplugin
\ No newline at end of file
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list