[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:06:43 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=77b4a75

The following commit has been merged in the master branch:
commit 77b4a75c0054c2aa9de87c06eeef1922ca976084
Author: David Edmundson <david at davidedmundson.co.uk>
Date:   Mon Apr 1 18:34:13 2013 +0100

    Remove KMessageWidget from ContactInfoDialog
    
    It is perfectly valid for upgradeContact() to fail if FeatureInfo is missing
    Also we should avoid showing Tp::PendingOperation error messages to the user
    
    REVIEW: 109556
    BUG: 316257
---
 KTp/contact-info-dialog.cpp | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/KTp/contact-info-dialog.cpp b/KTp/contact-info-dialog.cpp
index c17765d..6584fcb 100644
--- a/KTp/contact-info-dialog.cpp
+++ b/KTp/contact-info-dialog.cpp
@@ -36,7 +36,6 @@
 #include <TelepathyQt/PendingContacts>
 
 #include <KDebug>
-#include <KMessageWidget>
 #include <KTitleWidget>
 #include <KLocalizedString>
 #include <KPushButton>
@@ -80,7 +79,6 @@ class ContactInfoDialog::Private
         editable(false),
         infoDataChanged(false),
         avatarChanged(false),
-        messageWidget(0),
         columnsLayout(0),
         infoLayout(0),
         stateLayout(0),
@@ -109,7 +107,6 @@ class ContactInfoDialog::Private
 
     QMap<InfoRowIndex,QWidget*> infoValueWidgets;
 
-    KMessageWidget *messageWidget;
     QHBoxLayout *columnsLayout;
     QFormLayout *infoLayout;
     QFormLayout *stateLayout;
@@ -123,15 +120,6 @@ class ContactInfoDialog::Private
 
 void ContactInfoDialog::Private::onContactUpgraded(Tp::PendingOperation* op)
 {
-    if (op->isError()) {
-        messageWidget->setMessageType(KMessageWidget::Error);
-        messageWidget->setText(op->errorMessage());
-        messageWidget->setCloseButtonVisible(false);
-        messageWidget->setWordWrap(true);
-        messageWidget->animatedShow();
-        return;
-    }
-
     Tp::PendingContacts *contacts = qobject_cast<Tp::PendingContacts*>(op);
     Q_ASSERT(contacts->contacts().count() == 1);
 
@@ -180,15 +168,6 @@ void ContactInfoDialog::Private::onContactUpgraded(Tp::PendingOperation* op)
 
 void ContactInfoDialog::Private::onContactInfoReceived(Tp::PendingOperation* op)
 {
-    if (op->isError()) {
-        messageWidget->setMessageType(KMessageWidget::Error);
-        messageWidget->setText(op->errorMessage());
-        messageWidget->setCloseButtonVisible(false);
-        messageWidget->setWordWrap(true);
-        messageWidget->animatedShow();
-        return;
-    }
-
     Tp::PendingContactInfo *ci = qobject_cast<Tp::PendingContactInfo*>(op);
     const Tp::ContactInfoFieldList fieldList = ci->infoFields().allFields();
 
@@ -362,11 +341,6 @@ ContactInfoDialog::ContactInfoDialog(const Tp::AccountPtr& account, const Tp::Co
     titleWidget->setComment(contact->id());
     layout->addWidget(titleWidget);
 
-    /* Error message to show when an async operation fails */
-    d->messageWidget = new KMessageWidget(this);
-    d->messageWidget->setVisible(false);
-    layout->addWidget(d->messageWidget);
-
     /* 1st column: avatar; 2nd column: details */
     d->columnsLayout = new QHBoxLayout();
     d->columnsLayout->setSpacing(30);

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list