diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-08-10 00:45:24 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-08-10 00:45:24 +0200 |
commit | d194a6112299cfe045c34e5cdb6adbbb81418d09 (patch) | |
tree | 4973f946b6701c8aea8bed73e5c4c6c978ce8e66 /metawatch | |
parent | b1ccb04d7dd2fb20def829be084474ed329d4988 (diff) | |
download | sowatch-d194a6112299cfe045c34e5cdb6adbbb81418d09.tar.gz sowatch-d194a6112299cfe045c34e5cdb6adbbb81418d09.zip |
new watchhandler for watchlet/prov lifecycle mgmt
Diffstat (limited to 'metawatch')
-rw-r--r-- | metawatch/metawatch.cpp | 10 | ||||
-rw-r--r-- | metawatch/metawatchscanner.cpp | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index fe080e4..6f8edca 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -120,7 +120,13 @@ MetaWatch::MetaWatch(ConfigKey* settings, QObject* parent) : MetaWatch::~MetaWatch() { - delete _paintEngine; + if (_socket) { + _socket->close(); + delete _socket; + } + if (_paintEngine) { + delete _paintEngine; + } } QPaintEngine* MetaWatch::paintEngine() const @@ -724,7 +730,7 @@ void MetaWatch::socketDisconnected() timeToNextRetry = connectRetryTimes[_connectRetries]; _connectRetries++; } - qDebug() << "Backing off for " << timeToNextRetry << "seconds for next retry"; + qDebug() << "Backing off for" << timeToNextRetry << "seconds for next retry"; _connectAlignedTimer->start(timeToNextRetry / 2, timeToNextRetry * 2); if (_connectAlignedTimer->lastError() != QSystemAlignedTimer::NoError) { // I would like to know why QtM couldn't _emulate_ here using a QTimer by itself. diff --git a/metawatch/metawatchscanner.cpp b/metawatch/metawatchscanner.cpp index 99ccc93..a34f71b 100644 --- a/metawatch/metawatchscanner.cpp +++ b/metawatch/metawatchscanner.cpp @@ -37,9 +37,11 @@ void MetaWatchScanner::handleDiscoveredService(const QBluetoothServiceInfo &info qDebug() << "metawatch bluetooth scan found:" << deviceName; if (deviceName.contains("Digital", Qt::CaseInsensitive)) { foundInfo["driver"] = QString("metawatch-digital"); + foundInfo["next-watchlet-button"] = QString("A"); emit watchFound(foundInfo); } else if (deviceName.contains("Analog", Qt::CaseInsensitive)) { foundInfo["driver"] = QString("metawatch-analog"); + foundInfo["next-watchlet-button"] = QString("A"); emit watchFound(foundInfo); } else { qWarning() << "Unknown MetaWatch device found:" << deviceName; |