Browse Source

Missing const

QGC4.4
Don Gagne 11 years ago
parent
commit
8b4a3854b2
  1. 2
      src/comm/SerialLink.cc
  2. 2
      src/comm/TCPLink.cc

2
src/comm/SerialLink.cc

@ -27,7 +27,7 @@ SerialLink::SerialLink(QString portname, int baudRate, bool hardwareFlowControl, @@ -27,7 +27,7 @@ SerialLink::SerialLink(QString portname, int baudRate, bool hardwareFlowControl,
m_reqReset(false)
{
// We use QSerialPort::SerialPortError in a signal so we must declare it as a meta type
static int idMetaType = qRegisterMetaType<QSerialPort::SerialPortError>();
static const int idMetaType = qRegisterMetaType<QSerialPort::SerialPortError>();
Q_UNUSED(idMetaType);
// Get the name of the current port in use.

2
src/comm/TCPLink.cc

@ -46,7 +46,7 @@ TCPLink::TCPLink(QHostAddress hostAddress, quint16 socketPort) : @@ -46,7 +46,7 @@ TCPLink::TCPLink(QHostAddress hostAddress, quint16 socketPort) :
// Even though QAbstractSocket::SocketError is used in a signal by Qt, Qt doesn't declare it as a meta type.
// This in turn causes debug output to be kicked out about not being able to queue the signal. We register it
// as a meta type to silence that.
static int idMetaType = qRegisterMetaType<QAbstractSocket::SocketError>();
static const int idMetaType = qRegisterMetaType<QAbstractSocket::SocketError>();
Q_UNUSED(idMetaType);
_linkId = getNextLinkId();

Loading…
Cancel
Save