Skip to content

Commit

Permalink
[connectionagent] add browser request
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorn Potter committed Sep 16, 2013
1 parent 9d441e5 commit e8a51a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions connd/qconnectionmanager.cpp
Expand Up @@ -87,6 +87,8 @@ QConnectionManager::QConnectionManager(QObject *parent) :
connect(ua,SIGNAL(userInputCanceled()),this,SLOT(onUserInputCanceled()));
connect(ua,SIGNAL(userInputRequested(QString,QVariantMap)),
this,SLOT(onUserInputRequested(QString,QVariantMap)), Qt::UniqueConnection);
connect(ua,SIGNAL(browserRequested(QString,QString)),
this,SLOT(browserRequest(QString,QString)), Qt::UniqueConnection);

connect(netman,SIGNAL(serviceAdded(QString)),this,SLOT(onServiceAdded(QString)));
connect(netman,SIGNAL(serviceRemoved(QString)),this,SLOT(onServiceRemoved(QString)));
Expand Down Expand Up @@ -597,3 +599,9 @@ void QConnectionManager::technologyPowerChanged(bool b)
NetworkTechnology *tech = qobject_cast<NetworkTechnology *>(sender());
qDebug()<< b << tech->name();
}

void QConnectionManager::browserRequest(const QString &servicePath, const QString &url)
{
qDebug() << Q_FUNC_INFO << servicePath << url;
Q_EMIT requestBrowser(url);
}
5 changes: 4 additions & 1 deletion connd/qconnectionmanager.h
Expand Up @@ -55,8 +55,10 @@ class QConnectionManager : public QObject
void connectionRequest();
void configurationNeeded(const QString &type);
void connectionState(const QString &state, const QString &type);
///
void connectNow(const QString &path);

void requestBrowser(/*const QString &path,*/ const QString &url);

public Q_SLOTS:

void onUserInputRequested(const QString &servicePath, const QVariantMap &fields);
Expand Down Expand Up @@ -116,6 +118,7 @@ private slots:
void emitConnectionState();
void servicesError(const QString &);
void technologyPowerChanged(bool);
void browserRequest(const QString &servicePath, const QString &url);

};

Expand Down

0 comments on commit e8a51a2

Please sign in to comment.