[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:03:19 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=8de7a66
The following commit has been merged in the master branch:
commit 8de7a668f7611554e4746175fe5315a9ff3d0fe5
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Wed Jan 4 16:27:57 2012 +0100
Use "account" parameter to update display name in generic widget
---
src/KCMTelepathyAccounts/parameter-edit-widget.cpp | 16 ++++++++++++++++
src/KCMTelepathyAccounts/parameter-edit-widget.h | 1 +
2 files changed, 17 insertions(+)
diff --git a/src/KCMTelepathyAccounts/parameter-edit-widget.cpp b/src/KCMTelepathyAccounts/parameter-edit-widget.cpp
index fc666c5..6e28425 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-widget.cpp
@@ -3,6 +3,7 @@
*
* Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
* Copyright (C) 2011 Dominik Schmidt <kde at dominik-schmidt.de>
+ * Copyright (C) 2012 Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -54,6 +55,13 @@ ParameterEditWidget::ParameterEditWidget(ParameterEditModel *parameterModel,
connect(d->delegate,
SIGNAL(dataChanged(QModelIndex,QVariant,int)),
SLOT(onDelegateDataChanged(QModelIndex,QVariant,int)));
+
+ Tp::ProtocolParameter foundParameter = parameterModel->parameter(QLatin1String("account"));
+ if (foundParameter.isValid()) {
+ connect(d->delegate,
+ SIGNAL(dataChanged(QModelIndex,QVariant,int)),
+ SLOT(updateDefaultDisplayName()));
+ }
}
ParameterEditWidget::~ParameterEditWidget()
@@ -67,4 +75,12 @@ void ParameterEditWidget::onDelegateDataChanged(const QModelIndex &index, const
parameterModel()->setData(index, value, role);
}
+void ParameterEditWidget::updateDefaultDisplayName()
+{
+ Tp::ProtocolParameter foundParameter = parameterModel()->parameter(QLatin1String("account"));
+ if (foundParameter.isValid()) {
+ setDefaultDisplayName(parameterModel()->data(parameterModel()->indexForParameter(foundParameter)).toString());
+ }
+}
+
#include "parameter-edit-widget.moc"
diff --git a/src/KCMTelepathyAccounts/parameter-edit-widget.h b/src/KCMTelepathyAccounts/parameter-edit-widget.h
index 0e92bb7..5de6ab6 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-widget.h
+++ b/src/KCMTelepathyAccounts/parameter-edit-widget.h
@@ -37,6 +37,7 @@ public:
QWidget *parent = 0);
~ParameterEditWidget();
+ virtual void updateDefaultDisplayName();
private Q_SLOTS:
void onDelegateDataChanged(const QModelIndex &index, const QVariant &value, int role);
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list