Skip to content

Commit

Permalink
[connectionagent] Add servicePath to ConnAdaptor::errorReported() signal
Browse files Browse the repository at this point in the history
  • Loading branch information
rojkov committed Jun 7, 2013
1 parent 63429ee commit e6e4cc5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions connd/com.jollamobile.Connectiond.xml
Expand Up @@ -9,6 +9,7 @@
<arg name="type" type="s" direction="out"/>
</signal>
<signal name="errorReported">
<arg name="servicePath" type="s" direction="out"/>
<arg name="error" type="s" direction="out"/>
</signal>
<signal name="requestBrowser">
Expand Down
3 changes: 2 additions & 1 deletion connd/connadaptor.h
Expand Up @@ -37,6 +37,7 @@ class ConnAdaptor: public QDBusAbstractAdaptor
" <arg direction=\"out\" type=\"s\" name=\"type\"/>\n"
" </signal>\n"
" <signal name=\"errorReported\">\n"
" <arg direction=\"out\" type=\"s\" name=\"servicePath\"/>\n"
" <arg direction=\"out\" type=\"s\" name=\"error\"/>\n"
" </signal>\n"
" <signal name=\"requestBrowser\">\n"
Expand Down Expand Up @@ -84,7 +85,7 @@ public Q_SLOTS: // METHODS
void configurationNeeded(const QString &type);
void connectionRequest();
void connectionState(const QString &state, const QString &type);
void errorReported(const QString &error);
void errorReported(const QString &servicePath, const QString &error);
void requestBrowser(const QString &url);
void roamingAskChanged(bool askRoaming);
void userInputCanceled();
Expand Down
4 changes: 2 additions & 2 deletions connectionagentplugin/connectionagentplugin.cpp
Expand Up @@ -82,8 +82,8 @@ void ConnectionAgentPlugin::connectToConnectiond(QString)
connect(connManagerInterface,SIGNAL(userInputCanceled()),
this,SIGNAL(userInputCanceled()));

connect(connManagerInterface,SIGNAL(errorReported(QString)),
this,SLOT(onErrorReported(QString)));
connect(connManagerInterface, SIGNAL(errorReported(QString, QString)),
this, SLOT(onErrorReported(QString, QString)));

connect(connManagerInterface,SIGNAL(connectionState(QString, QString)),
this,SLOT(onConnectionState(QString, QString)));
Expand Down
2 changes: 1 addition & 1 deletion connectionagentplugin/connectionamanagerinterface.h
Expand Up @@ -67,7 +67,7 @@ public Q_SLOTS: // METHODS
void configurationNeeded(const QString &type);
void connectionRequest();
void connectionState(const QString &state, const QString &type);
void errorReported(const QString &error);
void errorReported(const QString &servicePath, const QString &error);
void requestBrowser(const QString &url);
void roamingAskChanged(bool askRoaming);
void userInputCanceled();
Expand Down
Expand Up @@ -102,12 +102,12 @@ void Tst_connectionagent_pluginTest::testRequestConnection()

void Tst_connectionagent_pluginTest::testErrorReported()
{
QSignalSpy spy(plugin, SIGNAL(errorReported(QString)));
QSignalSpy spy(plugin, SIGNAL(errorReported(QString, QString)));
plugin->connectToType("test");
QTest::qWait(2000);
QCOMPARE(spy.count(),1);
QList<QVariant> arguments = spy.takeFirst();
QCOMPARE(arguments.at(0).toString(), QString("Type not valid"));
QCOMPARE(arguments.at(1).toString(), QString("Type not valid"));
}

void Tst_connectionagent_pluginTest::testUserInputRequested_data()
Expand Down

0 comments on commit e6e4cc5

Please sign in to comment.