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

indent

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