Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[connectionagent] fix wlan<->wifi and mobile<->cellular in connectToType
  • Loading branch information
Pasi Sjöholm committed Aug 28, 2014
1 parent b5766ab commit 5c9b4c6
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions connd/qconnectionagent.cpp
Expand Up @@ -304,8 +304,17 @@ void QConnectionAgent::connectToType(const QString &type)
return;
}

QString convType;
if (type.contains("mobile")) {
convType="cellular";
} else if (type.contains("wlan")) {
convType="wifi";
} else {
convType=type;
}

Q_FOREACH (const QString &path, servicesMap.keys()) {
if (path.contains(type)) {
if (path.contains(convType)) {
if (!isStateOnline(servicesMap.value(path)->state())) {
if (servicesMap.value(path)->autoConnect()) {
qDebug() << "<<<<<<<<<<< requestConnect() >>>>>>>>>>>>";
Expand All @@ -318,7 +327,13 @@ void QConnectionAgent::connectToType(const QString &type)
}
}

Q_EMIT configurationNeeded(type);
if (type.contains("cellular")) {
convType="mobile";
} else if (type.contains("wifi")) {
convType="wlan";
}

Q_EMIT configurationNeeded(convType);
}

void QConnectionAgent::onScanFinished()
Expand Down

0 comments on commit 5c9b4c6

Please sign in to comment.