[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:57:32 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=6c89bbb

The following commit has been merged in the master branch:
commit 6c89bbb509a664e2b04c6fc6b6bba3058449edb9
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Mon Jul 27 11:07:41 2009 +0000

    Add a signal to the ProtocolSelectWidget that is emitted whenever the selected protocol is changed.
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1002933
---
 src/protocol-select-widget.cpp | 11 +++++++++++
 src/protocol-select-widget.h   |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/src/protocol-select-widget.cpp b/src/protocol-select-widget.cpp
index 783ffbb..faf2580 100644
--- a/src/protocol-select-widget.cpp
+++ b/src/protocol-select-widget.cpp
@@ -58,6 +58,10 @@ ProtocolSelectWidget::ProtocolSelectWidget(QWidget *parent)
     d->ui->setupUi(this);
     d->ui->protocolListView->setModel(d->model);
 
+    connect(d->ui->protocolListView->selectionModel(),
+            SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
+            SLOT(onCurrentChanged(const QModelIndex &)));
+
     // Load the list of all installed Telepathy Connection Managers Asynchronously
     QTimer::singleShot(0, this, SLOT(getConnectionManagerList()));
 }
@@ -127,3 +131,10 @@ ProtocolItem *ProtocolSelectWidget::selectedProtocol()
     return d->model->itemForIndex(selectedIndexes.at(0));
 }
 
+void ProtocolSelectWidget::onCurrentChanged(const QModelIndex &current)
+{
+    kDebug();
+
+    Q_EMIT selectedProtocolChanged(d->model->itemForIndex(current));
+}
+
diff --git a/src/protocol-select-widget.h b/src/protocol-select-widget.h
index b93d2a9..8e658f5 100644
--- a/src/protocol-select-widget.h
+++ b/src/protocol-select-widget.h
@@ -25,6 +25,8 @@
 
 class ProtocolItem;
 
+class QModelIndex;
+
 namespace Tp {
     class PendingOperation;
 }
@@ -42,6 +44,10 @@ public:
 private Q_SLOTS:
     void getConnectionManagerList();
     void onConnectionManagerListGot(Tp::PendingOperation *op);
+    void onCurrentChanged(const QModelIndex &current);
+
+Q_SIGNALS:
+    void selectedProtocolChanged(ProtocolItem *item);
 
 private:
     class Private;

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list