Add #ifdef around pseudo terminal code so Windows compiles.

merge-requests/1/head
Phil Taylor 2021-02-03 23:14:01 +00:00
rodzic 399b334407
commit 41727a30ba
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -10,7 +10,6 @@ commHandler::commHandler()
// grab baud rate and other comm port details // grab baud rate and other comm port details
// if they need to be changed later, please // if they need to be changed later, please
// destroy this and create a new one. // destroy this and create a new one.
port = new QSerialPort(); port = new QSerialPort();
@ -89,6 +88,9 @@ void commHandler::openPtPort()
success = pseudoterm->open(QIODevice::ReadWrite); success = pseudoterm->open(QIODevice::ReadWrite);
if(success) if(success)
{ {
#ifndef Q_OS_WIN
qDebug() << "Opened pt device, attempting to grant pt status"; qDebug() << "Opened pt device, attempting to grant pt status";
ptfd = pseudoterm->handle(); ptfd = pseudoterm->handle();
qDebug() << "ptfd: " << ptfd; qDebug() << "ptfd: " << ptfd;
@ -116,6 +118,7 @@ void commHandler::openPtPort()
{ {
qDebug() << "Received error from pseudo-terminal symlink command: code: [" << sysResult << "]" << " command: [" << ptLinkCmd << "]"; qDebug() << "Received error from pseudo-terminal symlink command: code: [" << sysResult << "]" << " command: [" << ptLinkCmd << "]";
} }
#endif
} else { } else {
ptfd = 0; ptfd = 0;