ui: Added plugin ports to preferences
bug id = 145
This commit is contained in:
@@ -6,17 +6,35 @@ QtIDECommunicationController::QtIDECommunicationController(QObject* parent, Stor
|
||||
: IDECommunicationController(storageAccess)
|
||||
, m_tcpWrapper(parent)
|
||||
{
|
||||
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
|
||||
|
||||
m_tcpWrapper.setReadCallback(std::bind(&QtIDECommunicationController::handleIncomingMessage, this, std::placeholders::_1));
|
||||
m_tcpWrapper.setServerPort(appSettings->getCoatiPort());
|
||||
m_tcpWrapper.setClientPort(appSettings->getPluginPort());
|
||||
m_tcpWrapper.startListening();
|
||||
}
|
||||
|
||||
QtIDECommunicationController::~QtIDECommunicationController()
|
||||
{}
|
||||
|
||||
void QtIDECommunicationController::startListening()
|
||||
{
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
|
||||
m_tcpWrapper.setServerPort(appSettings->getCoatiPort());
|
||||
m_tcpWrapper.setClientPort(appSettings->getPluginPort());
|
||||
m_tcpWrapper.startListening();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtIDECommunicationController::stopListening()
|
||||
{
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
m_tcpWrapper.stopListening();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
bool QtIDECommunicationController::isListening() const
|
||||
{
|
||||
return m_tcpWrapper.isListening();
|
||||
@@ -25,4 +43,4 @@ bool QtIDECommunicationController::isListening() const
|
||||
void QtIDECommunicationController::sendMessage(const std::string& message) const
|
||||
{
|
||||
m_tcpWrapper.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user