Why cast sender() to server when we have m_server
Summary: Why cast sender() to server when we have m_server Reviewers: #kde_connect, apol Reviewed By: #kde_connect, apol Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16760
This commit is contained in:
parent
7cb4de20c1
commit
931d3974ec
1 changed files with 1 additions and 2 deletions
|
@ -62,11 +62,10 @@ void UploadJob::newConnection()
|
||||||
return; //TODO: Handle error, clean up...
|
return; //TODO: Handle error, clean up...
|
||||||
}
|
}
|
||||||
|
|
||||||
Server* server = qobject_cast<Server*>(sender());
|
|
||||||
// FIXME : It is called again when payload sending is finished. Unsolved mystery :(
|
// FIXME : It is called again when payload sending is finished. Unsolved mystery :(
|
||||||
disconnect(m_server, &QTcpServer::newConnection, this, &UploadJob::newConnection);
|
disconnect(m_server, &QTcpServer::newConnection, this, &UploadJob::newConnection);
|
||||||
|
|
||||||
m_socket = server->nextPendingConnection();
|
m_socket = m_server->nextPendingConnection();
|
||||||
m_socket->setParent(this);
|
m_socket->setParent(this);
|
||||||
connect(m_socket, &QSslSocket::disconnected, this, &UploadJob::cleanup);
|
connect(m_socket, &QSslSocket::disconnected, this, &UploadJob::cleanup);
|
||||||
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketFailed(QAbstractSocket::SocketError)));
|
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketFailed(QAbstractSocket::SocketError)));
|
||||||
|
|
Loading…
Reference in a new issue