Commit 2929dc96 authored by Lorn Potter's avatar Lorn Potter

[connectionagent] send errorReported paths on to declarative.

parent 7eee72b5
......@@ -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<NetworkService *>(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;
}
......
......@@ -51,7 +51,7 @@ Q_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);
......
......@@ -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)
......
......@@ -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 @@ private:
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment