QObject::connect(socket, SIGNAL(readyRead()), this, SLOT(readData()));
}
+void BtConnector::disconnect(){
+ if(!socket)
+ return;
+
+ if(socket->isOpen())
+ socket->close();
+
+ delete socket;
+ socket = 0;
+
+ /*
+ * Explicitly set D to false in case the remote was shut off
+ * using the power key, which equals the 'D' key.
+ * Well, good intention but doesn't seem to work.
+ */
+ setD(false);
+}
+
void BtConnector::readData(){
// qDebug("readData...");
QByteArray data = socket->readAll();