[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:01:54 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=95e3b25
The following commit has been merged in the master branch:
commit 95e3b2587ea3b931d392bd79b9a72a3910aef8e6
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Tue Feb 28 00:41:31 2012 +0100
Always enable OK button
---
src/edit-display-name-button.cpp | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/edit-display-name-button.cpp b/src/edit-display-name-button.cpp
index 4627895..84ff86d 100644
--- a/src/edit-display-name-button.cpp
+++ b/src/edit-display-name-button.cpp
@@ -45,9 +45,6 @@ public:
QString displayName() const;
-private Q_SLOTS:
- void onTextChanged(const QString &text);
-
private:
Tp::AccountPtr m_account;
KLineEdit *m_displayNameLineEdit;
@@ -64,7 +61,6 @@ EditDisplayNameDialog::EditDisplayNameDialog(Tp::AccountPtr account,
setButtons( KDialog::Ok | KDialog::Cancel );
setWindowIcon(KIcon(QLatin1String("telepathy-kde")));
setFixedSize(250, 150);
- enableButtonOk(false);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
@@ -97,18 +93,12 @@ EditDisplayNameDialog::EditDisplayNameDialog(Tp::AccountPtr account,
QWidget * mainWidget = new QWidget(this);
mainWidget->setLayout(mainLayout);
setMainWidget(mainWidget);
-
- connect(m_displayNameLineEdit, SIGNAL(textChanged(QString)), SLOT(onTextChanged(QString)));
}
EditDisplayNameDialog::~EditDisplayNameDialog()
{
}
-void EditDisplayNameDialog::onTextChanged(const QString& text)
-{
- enableButtonOk(text != m_account->displayName());
-}
QString EditDisplayNameDialog::displayName() const
{
@@ -144,7 +134,7 @@ void EditDisplayNameButton::onClicked()
if (!m_account.isNull() && m_account->isValid()) {
EditDisplayNameDialog *dialog = new EditDisplayNameDialog(m_account, this);
dialog->exec();
- if (dialog->result() == KDialog::Accepted) {
+ if (dialog->result() == KDialog::Accepted && dialog->displayName() != m_account->displayName()) {
kDebug() << "Setting display name" << dialog->displayName() << "for account" << account()->uniqueIdentifier();
Tp::PendingOperation *op = m_account->setDisplayName(dialog->displayName());
connect(op, SIGNAL(finished(Tp::PendingOperation*)), SLOT(onFinished(Tp::PendingOperation*)));
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list