ui: vs plugin integration

Reworked vs solution based project setup to utilize new CDB feature
This commit is contained in:
Manuel Dobusch
2016-11-10 17:40:14 +01:00
parent 9aed97eee2
commit 0a3200f8ff
32 changed files with 744 additions and 254 deletions
+23 -2
View File
@@ -1,4 +1,5 @@
#include "QtTcpWrapper.h"
#include "qdatastream.h"
#include "utility/logging/logging.h"
@@ -100,12 +101,32 @@ void QtTcpWrapper::acceptConnection()
void QtTcpWrapper::startRead()
{
char buffer[1024] = { 0 };
QByteArray byteArray;
while (m_tcpClient->atEnd() == false)
{
QByteArray data = m_tcpClient->read(128);
byteArray += data;
}
/*QDataStream stream(&byteArray, QIODevice::ReadOnly);
QString string;
stream >> string;*/
QString string = QString::fromUtf8(byteArray);
if (m_readCallback != NULL)
{
std::string message = string.toStdString();
m_readCallback(message);
}
/*char buffer[1024] = { 0 };
m_tcpClient->read(buffer, m_tcpClient->bytesAvailable());
m_tcpClient->close();
if (m_readCallback != NULL)
{
m_readCallback(buffer);
}
}*/
}