[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:04:48 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=257851f
The following commit has been merged in the master branch:
commit 257851f2bcb84edf6e09e4cd8f627c209b265077
Author: Anant Kamath <kamathanant at gmail.com>
Date: Mon Sep 2 08:17:01 2013 +0530
Use handleParameter()
---
plugins/pintxo/main-options-widget.cpp | 17 ++---------------
plugins/pintxo/main-options-widget.h | 1 -
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/plugins/pintxo/main-options-widget.cpp b/plugins/pintxo/main-options-widget.cpp
index 15abc10..4b885cb 100644
--- a/plugins/pintxo/main-options-widget.cpp
+++ b/plugins/pintxo/main-options-widget.cpp
@@ -37,14 +37,8 @@ MainOptionsWidget::MainOptionsWidget(ParameterEditModel *model,
m_ui = new Ui::MainOptionsWidget;
m_ui->setupUi(this);
- mapper = new QDataWidgetMapper(this);
- mapper->setModel(parameterModel());
- mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
- mapper->setOrientation(Qt::Vertical);
- mapper->addMapping(m_ui->numberLineEdit, parameterModel()->indexForParameter(parameterModel()->parameter(QLatin1String("number"))).row());
- mapper->addMapping(m_ui->comboBox, parameterModel()->indexForParameter(parameterModel()->parameter(QLatin1String("simIdentifier"))).row());
- mapper->toFirst();
-
+ handleParameter(QLatin1String("number"), QVariant::String, m_ui->numberLineEdit, m_ui->numberLabel);
+ handleParameter(QLatin1String("simIdentifier"), QVariant::String, m_ui->comboBox, m_ui->modemLabel);
QTimer::singleShot(0, m_ui->numberLineEdit, SLOT(setFocus()));
}
@@ -53,13 +47,6 @@ MainOptionsWidget::~MainOptionsWidget()
delete m_ui;
}
-void MainOptionsWidget::submit()
-{
- mapper->submit();
- parameterModel()->setData(parameterModel()->indexForParameter(parameterModel()->parameter(QLatin1String("number"))), QValidator::Acceptable, ParameterEditModel::ValidityRole);
- parameterModel()->setData(parameterModel()->indexForParameter(parameterModel()->parameter(QLatin1String("simIdentifier"))), QValidator::Acceptable, ParameterEditModel::ValidityRole);
-}
-
bool MainOptionsWidget::validateParameterValues()
{
QString parameterNumber = parameterModel()->data(parameterModel()->indexForParameter(parameterModel()->parameter(QLatin1String("number"))), ParameterEditModel::ValueRole).toString();
diff --git a/plugins/pintxo/main-options-widget.h b/plugins/pintxo/main-options-widget.h
index 21a2cb8..160eec1 100644
--- a/plugins/pintxo/main-options-widget.h
+++ b/plugins/pintxo/main-options-widget.h
@@ -36,7 +36,6 @@ public:
QWidget *parent = 0);
virtual ~MainOptionsWidget();
virtual QString defaultDisplayName() const;
- virtual void submit();
virtual bool validateParameterValues();
private:
Q_DISABLE_COPY(MainOptionsWidget);
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list