27 QTcpSocket *socket = qobject_cast< QTcpSocket * >(
mSource );
30 QObject::connect( socket, SIGNAL(
error( QAbstractSocket::SocketError ) ),
this, SLOT(
error( QAbstractSocket::SocketError ) ) );
31 socket->connectToHost( host, port );
43 QTcpSocket *socket = qobject_cast< QTcpSocket * >(
mSource );
44 socket->write( QString(
"?WATCH={\"enable\":true,\"nmea\":true,\"raw\":true%1};" ).arg(
mDevice.isEmpty() ?
mDevice : QString(
",\"device\":%1" ).arg(
mDevice ) ).toUtf8() );
50 QTcpSocket *socket = qobject_cast< QTcpSocket * >(
mSource );
51 QgsDebugMsg( QString(
"error: %1 %2" ).arg( socketError ).arg( socket->errorString() ) );
53 Q_UNUSED( socketError );