make sure connman bearer service is autconnect before connecting
Change-Id: I4c9a93d69f7fe990bf9d7f2e939abbe2c82ba449 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
parent
da77aaa98c
commit
e368866d68
@ -189,6 +189,19 @@ void QConnmanEngine::connectToId(const QString &id)
|
||||
if (!serv->isValid()) {
|
||||
emit connectionError(id, QBearerEngineImpl::InterfaceLookupError);
|
||||
} else {
|
||||
if (serv->type() == QLatin1String("cellular")) {
|
||||
if (serv->roaming()) {
|
||||
if (!isRoamingAllowed(serv->path())) {
|
||||
emit connectionError(id, QBearerEngineImpl::OperationNotSupported);
|
||||
return;
|
||||
}
|
||||
if (isAlwaysAskRoaming()) {
|
||||
emit connectionError(id, QBearerEngineImpl::OperationNotSupported);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (serv->autoConnect())
|
||||
serv->connect();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user