Change in kio[master]: Add diagnostics when KIO Connection server fails to initialize

Jan Kundrát (Code Review) noreply at kde.org
Sat Dec 6 18:20:51 UTC 2014


Jan Kundrát has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/203

Change subject: Add diagnostics when KIO Connection server fails to initialize
......................................................................

Add diagnostics when KIO Connection server fails to initialize

Change-Id: I84d5d2cce7e2625d286d993e2a7c724627c3a84d
---
M src/core/connectionserver.cpp
M src/core/connectionserver.h
M src/core/slave.cpp
3 files changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/03/203/1

diff --git a/src/core/connectionserver.cpp b/src/core/connectionserver.cpp
index d523844..e913ac6 100644
--- a/src/core/connectionserver.cpp
+++ b/src/core/connectionserver.cpp
@@ -110,3 +110,8 @@
 
     conn->d->dequeue();
 }
+
+void ConnectionServer::errorString() const
+{
+    return d->backend ? d->backend->errorString : QString();
+}
diff --git a/src/core/connectionserver.h b/src/core/connectionserver.h
index cce1e81..8db48eb 100644
--- a/src/core/connectionserver.h
+++ b/src/core/connectionserver.h
@@ -65,6 +65,11 @@
     Connection *nextPendingConnection();
     void setNextPendingConnection(Connection *conn);
 
+    /**
+     * Textual description of an error related to the connection, if any.
+     */
+    void errorString() const;
+
 Q_SIGNALS:
     void newConnection();
 
@@ -75,4 +80,4 @@
 
 } // namespace KIO
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/core/slave.cpp b/src/core/slave.cpp
index 54dab07..23cf210 100644
--- a/src/core/slave.cpp
+++ b/src/core/slave.cpp
@@ -126,7 +126,7 @@
         m_idleSince = QDateTime();
         slaveconnserver->listenForRemote();
         if (!slaveconnserver->isListening()) {
-            qWarning() << "KIO Connection server not listening, could not connect";
+            qWarning() << "KIO Connection server not listening, could not connect. Error:" << slaveconnserver->errorString();
         }
     }
     ~SlavePrivate()

-- 
To view, visit https://gerrit.vesnicky.cesnet.cz/r/203
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84d5d2cce7e2625d286d993e2a7c724627c3a84d
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: Jan Kundrát <jkt at kde.org>
Gerrit-Reviewer: David Faure <faure at kde.org>
Gerrit-Reviewer: Sysadmin Testing Account <null at kde.org>


More information about the Kde-frameworks-devel mailing list