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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=26beb76

The following commit has been merged in the master branch:
commit 26beb76ec0c03082af7109308f901003145d9abb
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Wed Mar 28 22:19:18 2012 +0100

    Remove Add contact dialog as it is now moved to common internals.
---
 CMakeLists.txt                 |   2 -
 dialogs/add-contact-dialog.cpp | 110 -----------------------------------------
 dialogs/add-contact-dialog.h   |  48 ------------------
 dialogs/add-contact-dialog.ui  |  45 -----------------
 4 files changed, 205 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31bf58b..3849c39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,6 @@ set (ktp_contactlist_SRCS
      main.cpp
      main-widget.cpp
      global-presence-chooser.cpp
-     dialogs/add-contact-dialog.cpp
      dialogs/join-chat-room-dialog.cpp
      dialogs/remove-contact-dialog.cpp
      dialogs/contact-info.cpp
@@ -55,7 +54,6 @@ set (ktp_contactlist_SRCS
 
 kde4_add_ui_files (ktp_contactlist_SRCS
                    main-widget.ui
-                   dialogs/add-contact-dialog.ui
                    dialogs/join-chat-room-dialog.ui
                    dialogs/remove-contact-dialog.ui
                    dialogs/contact-info.ui
diff --git a/dialogs/add-contact-dialog.cpp b/dialogs/add-contact-dialog.cpp
deleted file mode 100644
index 09f99f7..0000000
--- a/dialogs/add-contact-dialog.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Add contact dialog
- *
- * 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 St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "add-contact-dialog.h"
-#include "ui_add-contact-dialog.h"
-
-#include <KTp/Models/accounts-model.h>
-#include <KTp/Models/accounts-model-item.h>
-
-#include <QObject>
-#include <QSortFilterProxyModel>
-#include <QDebug>
-
-
-#include <TelepathyQt/Account>
-#include <TelepathyQt/Connection>
-#include <TelepathyQt/ContactManager>
-
-/** A filter which only lists connections which accept adding contacts*/
-class SubscribableAccountsModel : public QSortFilterProxyModel
-{
-public:
-    SubscribableAccountsModel(QObject *parent);
-    virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
-};
-
-SubscribableAccountsModel::SubscribableAccountsModel(QObject *parent)
- : QSortFilterProxyModel(parent)
-{
-}
-
-bool SubscribableAccountsModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
-{
-    AccountsModelItem* item = sourceModel()->index(source_row, 0, source_parent).data(AccountsModel::ItemRole).value<AccountsModelItem*>();
-
-    if (item) {
-        Tp::AccountPtr account = item->account();
-
-        //if there's no connection we can't add contacts as we have no contactmanager
-        if (! account->connection()) {
-            return false;
-        }
-
-        //only show items which can add a contact (i.e hide accounts like IRC which are online but there's no point listing)
-        if (! account->connection()->contactManager()->canRequestPresenceSubscription()){
-            return false;
-        }
-    }
-    return true;
-}
-
-
-AddContactDialog::AddContactDialog(AccountsModel *accountModel, QWidget *parent) :
-    KDialog(parent),
-    ui(new Ui::AddContactDialog)
-{
-    QWidget *widget = new QWidget(this);
-    ui->setupUi(widget);
-    setMainWidget(widget);
-
-    SubscribableAccountsModel *filteredModel = new SubscribableAccountsModel(this);
-    filteredModel->setSourceModel(accountModel);
-    for (int i = 0; i < filteredModel->rowCount(); ++i) {
-        ui->accountCombo->addItem(KIcon(filteredModel->data(filteredModel->index(i, 0), AccountsModel::IconRole).toString()),
-                                  filteredModel->data(filteredModel->index(i, 0)).toString(),
-                                  filteredModel->data(filteredModel->index(i, 0), AccountsModel::ItemRole));
-    }
-
-    ui->screenNameLineEdit->setFocus();
-}
-
-AddContactDialog::~AddContactDialog()
-{
-    delete ui;
-}
-
-Tp::AccountPtr AddContactDialog::account() const
-{
-    QVariant itemData = ui->accountCombo->itemData(ui->accountCombo->currentIndex(),AccountsModel::ItemRole);
-    AccountsModelItem* item = itemData.value<AccountsModelItem*>();
-    if (item) {
-        return item->account();
-    } else {
-        return Tp::AccountPtr();
-    }
-}
-
-const QString AddContactDialog::screenName() const
-{
-    return ui->screenNameLineEdit->text();
-}
-
-#include "add-contact-dialog.moc"
diff --git a/dialogs/add-contact-dialog.h b/dialogs/add-contact-dialog.h
deleted file mode 100644
index b6ff8a4..0000000
--- a/dialogs/add-contact-dialog.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Add contact dialog
- *
- * 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 St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef ADDCONTACTDIALOG_H
-#define ADDCONTACTDIALOG_H
-
-#include <KDialog>
-
-#include <TelepathyQt/Types>
-
-namespace Ui {
-    class AddContactDialog;
-}
-
-class AccountsModel;
-
-class AddContactDialog : public KDialog
-{
-    Q_OBJECT
-
-public:
-    explicit AddContactDialog(AccountsModel* accountModel, QWidget *parent = 0);
-    virtual ~AddContactDialog();
-    Tp::AccountPtr account() const;
-    const QString screenName() const;
-
-private:
-    Ui::AddContactDialog *ui;
-};
-
-#endif // ADDCONTACTDIALOG_H
diff --git a/dialogs/add-contact-dialog.ui b/dialogs/add-contact-dialog.ui
deleted file mode 100644
index 616fc71..0000000
--- a/dialogs/add-contact-dialog.ui
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AddContactDialog</class>
- <widget class="QWidget" name="AddContactDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <layout class="QFormLayout" name="formLayout">
-   <item row="0" column="0">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Account:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1">
-    <widget class="KComboBox" name="accountCombo"/>
-   </item>
-   <item row="1" column="0">
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Screen Name:</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1">
-    <widget class="KLineEdit" name="screenNameLineEdit"/>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KLineEdit</class>
-   <extends>QLineEdit</extends>
-   <header>klineedit.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list