From 41727a30ba520d88e8fac0c98fdccc0d42a0fe5e Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Wed, 3 Feb 2021 23:14:01 +0000 Subject: [PATCH] Add #ifdef around pseudo terminal code so Windows compiles. --- commhandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commhandler.cpp b/commhandler.cpp index 7582630..9d0a7ba 100644 --- a/commhandler.cpp +++ b/commhandler.cpp @@ -10,7 +10,6 @@ commHandler::commHandler() // grab baud rate and other comm port details // if they need to be changed later, please // destroy this and create a new one. - port = new QSerialPort(); @@ -89,6 +88,9 @@ void commHandler::openPtPort() success = pseudoterm->open(QIODevice::ReadWrite); if(success) { + +#ifndef Q_OS_WIN + qDebug() << "Opened pt device, attempting to grant pt status"; ptfd = pseudoterm->handle(); qDebug() << "ptfd: " << ptfd; @@ -116,6 +118,7 @@ void commHandler::openPtPort() { qDebug() << "Received error from pseudo-terminal symlink command: code: [" << sysResult << "]" << " command: [" << ptLinkCmd << "]"; } +#endif } else { ptfd = 0;