diff --git a/connd/qconnectionagent.cpp b/connd/qconnectionagent.cpp index e9a9e49..26bd016 100644 --- a/connd/qconnectionagent.cpp +++ b/connd/qconnectionagent.cpp @@ -29,8 +29,6 @@ #include #include -#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(); diff --git a/connd/qconnectionagent.h b/connd/qconnectionagent.h index 89930db..3dfc605 100644 --- a/connd/qconnectionagent.h +++ b/connd/qconnectionagent.h @@ -81,36 +81,36 @@ public Q_SLOTS: 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 { public: - int indexOf(const QString &path, int from = 0) const { - Service key; - key.path = path; - return QVector::indexOf(key, from); - } - - bool contains(const QString &path) const { - Service key; - key.path = path; - return QVector::indexOf(key) >= 0; - } - - void remove(const QString &path) { - Service key; - key.path = path; - int pos = QVector::indexOf(key); - if (pos >= 0) - QVector::remove(pos); - } + int indexOf(const QString &path, int from = 0) const { + Service key; + key.path = path; + return QVector::indexOf(key, from); + } + + bool contains(const QString &path) const { + Service key; + key.path = path; + return QVector::indexOf(key) >= 0; + } + + void remove(const QString &path) { + Service key; + key.path = path; + int pos = QVector::indexOf(key); + if (pos >= 0) + QVector::remove(pos); + } }; void setup();