Skip to content

Commit

Permalink
[connectionagent] fix autonnection when there is no preferred tech in…
Browse files Browse the repository at this point in the history
… conf
  • Loading branch information
Lorn Potter committed Apr 19, 2013
1 parent 4114aca commit 27df350
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 543 deletions.
7 changes: 4 additions & 3 deletions connd/qconnectionmanager.cpp
Expand Up @@ -92,9 +92,9 @@ QConnectionManager::QConnectionManager(QObject *parent) :
}
}
connmanConf.close();
} else {
techPreferenceList << "wifi" << "bluetooth" << "cellular";
}
if (techPreferenceList.isEmpty())
techPreferenceList << "wifi" << "bluetooth" << "cellular";

updateServicesMap();
currentNetworkState = netman->state();
Expand Down Expand Up @@ -234,6 +234,7 @@ bool QConnectionManager::autoConnect()
&& servicesMap.value(servicePath)->roaming()) {
isCellRoaming = askForRoaming;
}

if(servicesMap.value(servicePath)->autoConnect()
&& servicesMap.value(servicePath)->favorite()
&& !isCellRoaming) {
Expand Down Expand Up @@ -331,6 +332,7 @@ void QConnectionManager::updateServicesMap()
QVector<NetworkService*> services = netman->getServices(tech);

Q_FOREACH (NetworkService *serv, services) {

servicesMap.insert(serv->path(), serv);
orderedServicesList << serv->path();
//auto migrate
Expand Down Expand Up @@ -393,7 +395,6 @@ void QConnectionManager::networkStateChanged(const QString &state)
void QConnectionManager::onServiceStrengthChanged(uint level)
{
NetworkService *service = qobject_cast<NetworkService *>(sender());
qDebug() << Q_FUNC_INFO << service->name() << level;
}

bool QConnectionManager::askRoaming() const
Expand Down

0 comments on commit 27df350

Please sign in to comment.