Commit 5c9b4c6a authored by Pasi Sjöholm's avatar Pasi Sjöholm

[connectionagent] fix wlan<->wifi and mobile<->cellular in connectToType

parent b5766ab0
......@@ -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() >>>>>>>>>>>>";
......@@ -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()
......
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