Skip to content

Commit

Permalink
Merge pull request #78 from lpotter/master
Browse files Browse the repository at this point in the history
[connectionagent] Do not send connectionRequest if there is a service
  • Loading branch information
lpotter committed Jul 9, 2014
2 parents 2147d2f + a38e153 commit ca1b23e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion connd/qconnectionagent.cpp
Expand Up @@ -170,7 +170,15 @@ void QConnectionAgent::onConnectionRequest()
{
sendConnectReply("Suppress", 15);
qDebug() << flightModeSuppression;
if (!flightModeSuppression) {
bool okToRequest = true;
Q_FOREACH (const QString &path, servicesMap.keys()) {
qDebug() << "checking" <<servicesMap.value(path)->name() << servicesMap.value(path)->autoConnect();
if (servicesMap.value(path)->autoConnect()) {
okToRequest = false;
break;
}
}
if (!flightModeSuppression && okToRequest) {
Q_EMIT connectionRequest();
}
}
Expand Down

0 comments on commit ca1b23e

Please sign in to comment.