Commit acd18168 authored by Patrick José Pereira's avatar Patrick José Pereira

Use Qt5 connect style

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent 0ee8973a
...@@ -84,9 +84,9 @@ void FollowMe::_settingsChanged() ...@@ -84,9 +84,9 @@ void FollowMe::_settingsChanged()
void FollowMe::_enable() void FollowMe::_enable()
{ {
connect(_toolbox->qgcPositionManager(), connect(_toolbox->qgcPositionManager(),
SIGNAL(positionInfoUpdated(QGeoPositionInfo)), &QGCPositionManager::positionInfoUpdated,
this, this,
SLOT(_setGPSLocation(QGeoPositionInfo))); &FollowMe::_setGPSLocation);
_gcsMotionReportTimer.setInterval(_toolbox->qgcPositionManager()->updateInterval()); _gcsMotionReportTimer.setInterval(_toolbox->qgcPositionManager()->updateInterval());
_gcsMotionReportTimer.start(); _gcsMotionReportTimer.start();
} }
...@@ -94,9 +94,9 @@ void FollowMe::_enable() ...@@ -94,9 +94,9 @@ void FollowMe::_enable()
void FollowMe::_disable() void FollowMe::_disable()
{ {
disconnect(_toolbox->qgcPositionManager(), disconnect(_toolbox->qgcPositionManager(),
SIGNAL(positionInfoUpdated(QGeoPositionInfo)), &QGCPositionManager::positionInfoUpdated,
this, this,
SLOT(_setGPSLocation(QGeoPositionInfo))); &FollowMe::_setGPSLocation);
_gcsMotionReportTimer.stop(); _gcsMotionReportTimer.stop();
} }
......
...@@ -158,7 +158,7 @@ JasonMonger kMonger; ...@@ -158,7 +158,7 @@ JasonMonger kMonger;
QGeoCodeReplyQGC::QGeoCodeReplyQGC(QNetworkReply *reply, QObject *parent) QGeoCodeReplyQGC::QGeoCodeReplyQGC(QNetworkReply *reply, QObject *parent)
: QGeoCodeReply(parent), m_reply(reply) : 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)), connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
this, SLOT(networkReplyError(QNetworkReply::NetworkError))); this, SLOT(networkReplyError(QNetworkReply::NetworkError)));
......
...@@ -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); 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)), connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
this, SLOT(replyError(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); 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)), connect(geocodeReply, SIGNAL(error(QGeoCodeReply::Error,QString)),
this, SLOT(replyError(QGeoCodeReply::Error,QString))); this, SLOT(replyError(QGeoCodeReply::Error,QString)));
......
...@@ -189,7 +189,7 @@ QGeoTiledMapReplyQGC::cacheError(QGCMapTask::TaskType type, QString /*errorStrin ...@@ -189,7 +189,7 @@ QGeoTiledMapReplyQGC::cacheError(QGCMapTask::TaskType type, QString /*errorStrin
#endif #endif
_reply = _networkManager->get(_request); _reply = _networkManager->get(_request);
_reply->setParent(0); _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))); connect(_reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(networkReplyError(QNetworkReply::NetworkError)));
#if !defined(__mobile__) #if !defined(__mobile__)
_networkManager->setProxy(proxy); _networkManager->setProxy(proxy);
......
...@@ -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 // 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. // 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); emit waitForBytesWritten(1000);
// Check for loopback, both from signal received and actual bytes returned // Check for loopback, both from signal received and actual bytes returned
......
...@@ -30,7 +30,7 @@ void TCPLoopBackServer::run(void) ...@@ -30,7 +30,7 @@ void TCPLoopBackServer::run(void)
_tcpServer = new QTcpServer(this); _tcpServer = new QTcpServer(this);
Q_CHECK_PTR(_tcpServer); 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_ASSERT(connected);
Q_UNUSED(connected); // Fix initialized-but-not-referenced warning on release builds 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); Q_ASSERT(_tcpServer);
_tcpSocket = _tcpServer->nextPendingConnection(); _tcpSocket = _tcpServer->nextPendingConnection();
Q_ASSERT(_tcpSocket); 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_ASSERT(connected);
Q_UNUSED(connected); // Fix initialized-but-not-referenced warning on release builds Q_UNUSED(connected); // Fix initialized-but-not-referenced warning on release builds
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment