Browse Source

Use Qt5 connect style

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 7 years ago
parent
commit
acd18168df
  1. 8
      src/FollowMe/FollowMe.cc
  2. 2
      src/QtLocationPlugin/QGeoCodeReplyQGC.cpp
  3. 4
      src/QtLocationPlugin/QGeoCodingManagerEngineQGC.cpp
  4. 2
      src/QtLocationPlugin/QGeoMapReplyQGC.cpp
  5. 2
      src/qgcunittest/TCPLinkTest.cc
  6. 4
      src/qgcunittest/TCPLoopBackServer.cc

8
src/FollowMe/FollowMe.cc

@ -84,9 +84,9 @@ void FollowMe::_settingsChanged() @@ -84,9 +84,9 @@ void FollowMe::_settingsChanged()
void FollowMe::_enable()
{
connect(_toolbox->qgcPositionManager(),
SIGNAL(positionInfoUpdated(QGeoPositionInfo)),
&QGCPositionManager::positionInfoUpdated,
this,
SLOT(_setGPSLocation(QGeoPositionInfo)));
&FollowMe::_setGPSLocation);
_gcsMotionReportTimer.setInterval(_toolbox->qgcPositionManager()->updateInterval());
_gcsMotionReportTimer.start();
}
@ -94,9 +94,9 @@ void FollowMe::_enable() @@ -94,9 +94,9 @@ void FollowMe::_enable()
void FollowMe::_disable()
{
disconnect(_toolbox->qgcPositionManager(),
SIGNAL(positionInfoUpdated(QGeoPositionInfo)),
&QGCPositionManager::positionInfoUpdated,
this,
SLOT(_setGPSLocation(QGeoPositionInfo)));
&FollowMe::_setGPSLocation);
_gcsMotionReportTimer.stop();
}

2
src/QtLocationPlugin/QGeoCodeReplyQGC.cpp

@ -158,7 +158,7 @@ JasonMonger kMonger; @@ -158,7 +158,7 @@ JasonMonger kMonger;
QGeoCodeReplyQGC::QGeoCodeReplyQGC(QNetworkReply *reply, QObject *parent)
: QGeoCodeReply(parent), m_reply(reply)
{
connect(m_reply, SIGNAL(finished()), this, SLOT(networkReplyFinished()));
connect(m_reply, &QNetworkReply::finished, this, &QGeoCodeReplyQGC::networkReplyFinished);
connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
this, SLOT(networkReplyError(QNetworkReply::NetworkError)));

4
src/QtLocationPlugin/QGeoCodingManagerEngineQGC.cpp

@ -125,7 +125,7 @@ QGeoCodeReply *QGeoCodingManagerEngineQGC::geocode(const QString &address, int l @@ -125,7 +125,7 @@ QGeoCodeReply *QGeoCodingManagerEngineQGC::geocode(const QString &address, int l
QGeoCodeReplyQGC *geocodeReply = new QGeoCodeReplyQGC(reply);
connect(geocodeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(geocodeReply, &QGeoCodeReply::finished, this, &QGeoCodingManagerEngineQGC::replyFinished);
connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
this, SLOT(replyError(QGeoCodeReply::Error,QString)));
@ -156,7 +156,7 @@ QGeoCodeReply *QGeoCodingManagerEngineQGC::reverseGeocode(const QGeoCoordinate & @@ -156,7 +156,7 @@ QGeoCodeReply *QGeoCodingManagerEngineQGC::reverseGeocode(const QGeoCoordinate &
QGeoCodeReplyQGC *geocodeReply = new QGeoCodeReplyQGC(reply);
connect(geocodeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(geocodeReply, &QGeoCodeReply::finished, this, &QGeoCodingManagerEngineQGC::replyFinished);
connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
this, SLOT(replyError(QGeoCodeReply::Error,QString)));

2
src/QtLocationPlugin/QGeoMapReplyQGC.cpp

@ -189,7 +189,7 @@ QGeoTiledMapReplyQGC::cacheError(QGCMapTask::TaskType type, QString /*errorStrin @@ -189,7 +189,7 @@ QGeoTiledMapReplyQGC::cacheError(QGCMapTask::TaskType type, QString /*errorStrin
#endif
_reply = _networkManager->get(_request);
_reply->setParent(0);
connect(_reply, SIGNAL(finished()), this, SLOT(networkReplyFinished()));
connect(_reply, &QNetworkReply::finished, this, &QGeoTiledMapReplyQGC::networkReplyFinished);
connect(_reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(networkReplyError(QNetworkReply::NetworkError)));
#if !defined(__mobile__)
_networkManager->setProxy(proxy);

2
src/qgcunittest/TCPLinkTest.cc

@ -130,7 +130,7 @@ void TCPLinkTest::_connectSucceed_test(void) @@ -130,7 +130,7 @@ void TCPLinkTest::_connectSucceed_test(void)
// We emit this signal such that it will be queued and run on the TCPLink thread. This in turn
// allows the TCPLink object to pump the bytes through.
connect(this, SIGNAL(waitForBytesWritten(int)), _link, SLOT(waitForBytesWritten(int)));
connect(this, &TCPLinkTest::waitForBytesWritten, _link, &TCPLink::waitForBytesWritten);
emit waitForBytesWritten(1000);
// Check for loopback, both from signal received and actual bytes returned

4
src/qgcunittest/TCPLoopBackServer.cc

@ -30,7 +30,7 @@ void TCPLoopBackServer::run(void) @@ -30,7 +30,7 @@ void TCPLoopBackServer::run(void)
_tcpServer = new QTcpServer(this);
Q_CHECK_PTR(_tcpServer);
bool connected = QObject::connect(_tcpServer, SIGNAL(newConnection()), this, SLOT(_newConnection()));
bool connected = QObject::connect(_tcpServer, &QTcpServer::newConnection, this, &TCPLoopBackServer::_newConnection);
Q_ASSERT(connected);
Q_UNUSED(connected); // Fix initialized-but-not-referenced warning on release builds
@ -45,7 +45,7 @@ void TCPLoopBackServer::_newConnection(void) @@ -45,7 +45,7 @@ void TCPLoopBackServer::_newConnection(void)
Q_ASSERT(_tcpServer);
_tcpSocket = _tcpServer->nextPendingConnection();
Q_ASSERT(_tcpSocket);
bool connected = QObject::connect(_tcpSocket, SIGNAL(readyRead()), this, SLOT(_readBytes()));
bool connected = QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &TCPLoopBackServer::_readBytes);
Q_ASSERT(connected);
Q_UNUSED(connected); // Fix initialized-but-not-referenced warning on release builds
}

Loading…
Cancel
Save