ui: Added plugin ports to preferences
bug id = 145
This commit is contained in:
@@ -8,22 +8,29 @@ QtTcpWrapper::QtTcpWrapper(QObject* parent, const std::string& ip, const quint16
|
||||
, m_clientPort(clientPort)
|
||||
, m_ip(ip)
|
||||
{
|
||||
m_tcpServer = new QTcpServer(this);
|
||||
|
||||
connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
|
||||
}
|
||||
|
||||
void QtTcpWrapper::startListening()
|
||||
{
|
||||
QHostAddress address(m_ip.c_str());
|
||||
|
||||
m_tcpServer = new QTcpServer(this);
|
||||
|
||||
connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
|
||||
|
||||
if (!m_tcpServer->listen(QHostAddress::LocalHost, m_serverPort))
|
||||
{
|
||||
LOG_ERROR_STREAM(<< "TCP server failed to start with error: \"" + m_tcpServer->errorString().toStdString() + "\". Unable to listen for IDE plugin messages.");
|
||||
}
|
||||
}
|
||||
|
||||
void QtTcpWrapper::stopListening()
|
||||
{
|
||||
if (isListening())
|
||||
{
|
||||
m_tcpServer->close();
|
||||
}
|
||||
}
|
||||
|
||||
QtTcpWrapper::~QtTcpWrapper()
|
||||
{
|
||||
if (m_tcpServer != NULL)
|
||||
|
||||
Reference in New Issue
Block a user