Commit 949b18c0 authored by Pekka Vuorela's avatar Pekka Vuorela

indent

parent ad4971f5
......@@ -29,8 +29,6 @@
#include <QObject>
#include <QSettings>
#define CONNMAN_1_21
#define CONND_SERVICE "com.jolla.Connectiond"
#define CONND_PATH "/Connectiond"
#define CONND_SESSION_PATH = "/ConnectionSession"
......@@ -607,7 +605,7 @@ bool QConnectionAgent::isBestService(NetworkService *service)
void QConnectionAgent::scanTimeout()
{
if (!tetheringWifiTech || tetheringWifiTech->tethering())
return;
return;
if (tetheringWifiTech->powered() && !tetheringWifiTech->connected() && netman->defaultRoute()->type() != "wifi" ) {
tetheringWifiTech->scan();
......
......@@ -81,36 +81,36 @@ private:
class Service
{
public:
QString path;
NetworkService *service;
QString path;
NetworkService *service;
bool operator==(const Service &other) const {
return other.path == path;
}
bool operator==(const Service &other) const {
return other.path == path;
}
};
class ServiceList : public QVector<Service>
{
public:
int indexOf(const QString &path, int from = 0) const {
Service key;
key.path = path;
return QVector<Service>::indexOf(key, from);
}
bool contains(const QString &path) const {
Service key;
key.path = path;
return QVector<Service>::indexOf(key) >= 0;
}
void remove(const QString &path) {
Service key;
key.path = path;
int pos = QVector<Service>::indexOf(key);
if (pos >= 0)
QVector<Service>::remove(pos);
}
int indexOf(const QString &path, int from = 0) const {
Service key;
key.path = path;
return QVector<Service>::indexOf(key, from);
}
bool contains(const QString &path) const {
Service key;
key.path = path;
return QVector<Service>::indexOf(key) >= 0;
}
void remove(const QString &path) {
Service key;
key.path = path;
int pos = QVector<Service>::indexOf(key);
if (pos >= 0)
QVector<Service>::remove(pos);
}
};
void setup();
......
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