Skip to content

Commit

Permalink
indent
Browse files Browse the repository at this point in the history
  • Loading branch information
pvuorela committed Jul 7, 2015
1 parent ad4971f commit 949b18c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
4 changes: 1 addition & 3 deletions connd/qconnectionagent.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
Expand Down
48 changes: 24 additions & 24 deletions connd/qconnectionagent.h
Expand Up @@ -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<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();
Expand Down

0 comments on commit 949b18c

Please sign in to comment.