From 3ca9235ddb93b52730099164a0dc387f7a301280 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 12 May 2013 03:49:38 +0200 Subject: weather rendering in metawatchwatchlets --- metawatch/metawatch.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'metawatch/metawatch.cpp') diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index b5aec49..3845817 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -269,8 +269,12 @@ void MetaWatch::setupBluetoothWatch() _currentMode = IdleMode; _paintMode = IdleMode; - connect(_socket, SIGNAL(readyRead()), + if (_socket) { + // If we are running under the simulator, there might not be + // a socket. + connect(_socket, SIGNAL(readyRead()), SLOT(dataReceived())); + } // Configure the watch according to user preferences updateWatchProperties(); @@ -468,9 +472,6 @@ void MetaWatch::enableButton(Mode mode, Button button, ButtonPress press) // the pressed button and the event code were. msg.data[4] = 0x80 | ((press << 4) & 0x30) | (button & 0xF); - qDebug() << "enable button" << button << "(" << press << ")" << - "in mode" << mode << "to" << static_cast(msg.data[4]); - send(msg); } -- cgit v1.2.3