[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:14:40 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=7d10135

The following commit has been merged in the master branch:
commit 7d1013500e22cf5deb362852abaedd852bc08186
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sun Dec 9 16:20:03 2012 -0800

    Supress all errors unless we are connected to the network
    
    BUG: 303498
    REVIEW: 107654
---
 error-handler.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/error-handler.cpp b/error-handler.cpp
index 5bfe7ae..55c40e4 100644
--- a/error-handler.cpp
+++ b/error-handler.cpp
@@ -51,6 +51,11 @@ void ErrorHandler::handleErrors(const Tp::ConnectionStatus status)
 {
     Tp::AccountPtr account(qobject_cast< Tp::Account* >(sender()));
 
+    //if we're not connected to the network, don't display any errors.
+    if (Solid::Networking::status() != Solid::Networking::Connected) {
+        return;
+    }
+
     if (status == Tp::ConnectionStatusDisconnected) {
         QString connectionError = account->connectionError();
 
@@ -64,10 +69,7 @@ void ErrorHandler::handleErrors(const Tp::ConnectionStatus status)
                 showMessageToUser(i18nc("%1 ist the account name", "Could not connect %1. Authentication failed (is your password correct?)", account->displayName()), ErrorHandler::SystemMessageError);
                 break;
             case Tp::ConnectionStatusReasonNetworkError:
-                //if connected to the network, and there was a network error - display it. Otherwise do nothing.
-                if (Solid::Networking::status() == Solid::Networking::Connected) {
-                    showMessageToUser(i18nc("%1 ist the account name", "Could not connect %1. There was a network error, check your connection", account->displayName()), ErrorHandler::SystemMessageError);
-                }
+                showMessageToUser(i18nc("%1 ist the account name", "Could not connect %1. There was a network error, check your connection", account->displayName()), ErrorHandler::SystemMessageError);
                 break;
             default:
                 showMessageToUser(i18nc("%1 ist the account name, %2 the error message", "There was a problem while trying to connect %1 - %2", account->displayName(), KTp::ErrorDictionary::displayVerboseErrorMessage(connectionError)), ErrorHandler::SystemMessageError);

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list