[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:04:37 UTC 2016


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

The following commit has been merged in the master branch:
commit 6de629bdcbb5f113c293a0ed5912a87f565165be
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Tue Oct 25 18:10:51 2011 +0200

    Add org.freedesktop.DBus.Error.NoReply to the dictionary
---
 error-dictionary.cpp | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/error-dictionary.cpp b/error-dictionary.cpp
index 7cf6e7a..5f84b7b 100644
--- a/error-dictionary.cpp
+++ b/error-dictionary.cpp
@@ -23,6 +23,7 @@
 #include <KLocalizedString>
 #include <KGlobal>
 #include <KLocale>
+#include <KDebug>
 
 ErrorDictionary* ErrorDictionary::s_instance = NULL;
 
@@ -147,7 +148,8 @@ ErrorDictionary::ErrorDictionary(QObject* parent = 0)
              i18nc("Verbose user visible error string", "The channel was terminated for no apparent reason"));
     m_verboseDict.insert(QLatin1String("org.freedesktop.Telepathy.Error.WouldBreakAnonymity"),
              i18nc("Verbose user visible error string", "This operation can not be finished as it would break your anonymity request"));
-
+    m_verboseDict.insert(QLatin1String("org.freedesktop.DBus.Error.NoReply"),
+             i18nc("Verbose user visible error string", "Some of the IM components are not working correctly (and your system does not tell us which one)"));
 
     m_shortDict.insert(QLatin1String("org.freedesktop.Telepathy.Error.AlreadyConnected"),
              i18nc("Short user visible error string", "Connected elsewhere"));
@@ -255,6 +257,8 @@ ErrorDictionary::ErrorDictionary(QObject* parent = 0)
              i18nc("Short user visible error string", "Channel terminated"));
     m_shortDict.insert(QLatin1String("org.freedesktop.Telepathy.Error.WouldBreakAnonymity"),
              i18nc("Short user visible error string", "Anonymity break possible"));
+    m_shortDict.insert(QLatin1String("org.freedesktop.DBus.Error.NoReply"),
+             i18nc("Short user visible error string", "Internal component error"));
 }
 
 ErrorDictionary::~ErrorDictionary()
@@ -264,10 +268,20 @@ ErrorDictionary::~ErrorDictionary()
 
 QString ErrorDictionary::displayVerboseErrorMessage(const QString& dbusErrorName) const
 {
-    return m_verboseDict.value(dbusErrorName);
+    if (!m_verboseDict.contains(dbusErrorName)) {
+        return i18nc("User visible error string", "An unknown error was encountered (%1), please report this", dbusErrorName);
+    } else {
+        return m_verboseDict.value(dbusErrorName);
+    }
 }
 
 QString ErrorDictionary::displayShortErrorMessage(const QString& dbusErrorName) const
 {
-    return m_shortDict.value(dbusErrorName);
+    if (!m_shortDict.contains(dbusErrorName)) {
+        //print the error so users can send it in
+        kWarning() << "Unknown error encountered:" << dbusErrorName;
+        return i18nc("User visible error string", "Unknown error");
+    } else {
+        return m_shortDict.value(dbusErrorName);
+    }
 }

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list