diff --git a/connd/qconnectionmanager.cpp b/connd/qconnectionmanager.cpp index cd14b61..1c54f49 100644 --- a/connd/qconnectionmanager.cpp +++ b/connd/qconnectionmanager.cpp @@ -152,10 +152,9 @@ void QConnectionManager::onUserInputCanceled() // from useragent void QConnectionManager::onErrorReported(const QString &servicePath, const QString &error) { - Q_UNUSED(servicePath) qDebug() << Q_FUNC_INFO; - Q_EMIT errorReported(error); + Q_EMIT errorReported(servicePath, error); } // from useragent @@ -212,7 +211,8 @@ void QConnectionManager::onServiceRemoved(const QString &/*servicePath*/) void QConnectionManager::serviceErrorChanged(const QString &error) { - Q_EMIT errorReported(error); + NetworkService *service = qobject_cast(sender()); + Q_EMIT errorReported(service->path(),error); } void QConnectionManager::serviceStateChanged(const QString &state) @@ -228,7 +228,7 @@ void QConnectionManager::serviceStateChanged(const QString &state) service->requestDisconnect(); service->remove(); //reset this service okToConnect = true; - Q_EMIT errorReported("Connection failure: "+ service->name()); + Q_EMIT errorReported(service->path(), "Connection failure: "+ service->name()); } //auto migrate @@ -328,7 +328,7 @@ void QConnectionManager::connectToType(const QString &type) qDebug() << Q_FUNC_INFO << techPath; if (techPath.isEmpty()) { - Q_EMIT errorReported("Type not valid"); + Q_EMIT errorReported("","Type not valid"); return; } diff --git a/connd/qconnectionmanager.h b/connd/qconnectionmanager.h index 231c9be..f5efd32 100644 --- a/connd/qconnectionmanager.h +++ b/connd/qconnectionmanager.h @@ -51,7 +51,7 @@ class QConnectionManager : public QObject void userInputRequested(const QString &servicePath, const QVariantMap &fields); void userInputCanceled(); - void errorReported(const QString &error); + void errorReported(const QString &servicePath, const QString &error); void connectionRequest(); void configurationNeeded(const QString &type); void connectionState(const QString &state, const QString &type); diff --git a/connectionagentplugin/connectionagentplugin.cpp b/connectionagentplugin/connectionagentplugin.cpp index 1c1df7e..95e104c 100644 --- a/connectionagentplugin/connectionagentplugin.cpp +++ b/connectionagentplugin/connectionagentplugin.cpp @@ -96,23 +96,23 @@ void ConnectionAgentPlugin::connectToConnectiond(QString) } void ConnectionAgentPlugin::sendUserReply(const QVariantMap &input) -{ +{ if (!connManagerInterface || !connManagerInterface->isValid()) { - Q_EMIT errorReported("ConnectionAgent not available"); + Q_EMIT errorReported("","ConnectionAgent not available"); return; } QDBusPendingReply<> reply = connManagerInterface->sendUserReply(input); reply.waitForFinished(); if (reply.isError()) { qDebug() << Q_FUNC_INFO << reply.error().message(); - Q_EMIT errorReported(reply.error().message()); + Q_EMIT errorReported("",reply.error().message()); } } void ConnectionAgentPlugin::sendConnectReply(const QString &replyMessage, int timeout) { if (!connManagerInterface || !connManagerInterface->isValid()) { - Q_EMIT errorReported("ConnectionAgent not available"); + Q_EMIT errorReported("","ConnectionAgent not available"); return; } connManagerInterface->sendConnectReply(replyMessage,timeout); @@ -121,16 +121,16 @@ void ConnectionAgentPlugin::sendConnectReply(const QString &replyMessage, int ti void ConnectionAgentPlugin::connectToType(const QString &type) { if (!connManagerInterface || !connManagerInterface->isValid()) { - Q_EMIT errorReported("ConnectionAgent not available"); + Q_EMIT errorReported("","ConnectionAgent not available"); return; } connManagerInterface->connectToType(type); } -void ConnectionAgentPlugin::onErrorReported(const QString &error) +void ConnectionAgentPlugin::onErrorReported(const QString &servicePath, const QString &error) { - Q_EMIT errorReported(error); + Q_EMIT errorReported(servicePath, error); } void ConnectionAgentPlugin::onRequestBrowser(const QString &url) diff --git a/connectionagentplugin/connectionagentplugin.h b/connectionagentplugin/connectionagentplugin.h index f8fa7bb..680b181 100644 --- a/connectionagentplugin/connectionagentplugin.h +++ b/connectionagentplugin/connectionagentplugin.h @@ -42,7 +42,7 @@ public slots: signals: void userInputRequested(const QString &servicePath, const QVariantMap &fields); void userInputCanceled(); - void errorReported(const QString &error); + void errorReported(const QString &servicePath, const QString &error); void connectionRequest(); void configurationNeeded(const QString &type); void connectionState(const QString &state, const QString &type); @@ -52,7 +52,7 @@ public slots: QDBusServiceWatcher *connectiondWatcher; private slots: - void onErrorReported(const QString &error); + void onErrorReported(const QString &servicePath, const QString &error); void onRequestBrowser(const QString &url); void onUserInputRequested(const QString &service, const QVariantMap &fields); void onConnectionRequested();