[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:06:32 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=c29e690
The following commit has been merged in the master branch:
commit c29e690daa4a970ef918c768051634ca15e3640a
Author: Martin Klapetek <mklapetek at kde.org>
Date: Tue Mar 17 15:31:42 2015 +0100
Allow some fields to be disabled but not defaulted on submitting
The Google account is now authenticated via oauth and therefore the
email address cannot be changed, simply disabling the input made it
reset to default value on dialog confirming (it's more complex inner
mechanism for other parameters) so we need some property on the widget
to say "don't default this when submitting".
---
plugins/gabble/main-options-widget-googletalk.cpp | 1 +
src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/gabble/main-options-widget-googletalk.cpp b/plugins/gabble/main-options-widget-googletalk.cpp
index c902bd4..2850087 100644
--- a/plugins/gabble/main-options-widget-googletalk.cpp
+++ b/plugins/gabble/main-options-widget-googletalk.cpp
@@ -27,6 +27,7 @@ MainOptionsWidgetGoogleTalk::MainOptionsWidgetGoogleTalk(ParameterEditModel *mod
// Set up the UI.
m_ui = new Ui::MainOptionsWidgetGoogleTalk;
m_ui->setupUi(this);
+ m_ui->accountLineEdit->setProperty("noDefault", true);
handleParameter(QLatin1String("account"), QVariant::String, m_ui->accountLineEdit, m_ui->accountLabel);
QTimer::singleShot(0, m_ui->accountLineEdit, SLOT(setFocus()));
diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
index f96217b..63da1e3 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
@@ -165,7 +165,7 @@ void AbstractAccountParametersWidget::submit()
//reset disabled widgets to their default values
Q_FOREACH (QWidget *w, d->mappedWidgets) {
- if (!w->isEnabled()) {
+ if (!w->isEnabled() && w->property("noDefault").toBool() != true) {
QModelIndex index = d->parameterModel->index(d->mapper->mappedSection(w), 0);
QVariant defaultValue = d->parameterModel->data(index, ParameterEditModel::DefaultValueRole);
d->parameterModel->setData(index, defaultValue, Qt::EditRole);
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list