comparison vamp-client/qt/ProcessQtTransport.h @ 284:3398554568c7

Fix for Qt < 5.4 compatibility
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 15 Jan 2019 13:26:26 +0000
parents ce42f0bebae3
children b66077ee37a3
comparison
equal deleted inserted replaced
283:b0f0e257d8af 284:3398554568c7
275 m_process->setReadChannel(QProcess::StandardOutput); 275 m_process->setReadChannel(QProcess::StandardOutput);
276 return; 276 return;
277 } 277 }
278 278
279 QByteArray buffer = m_process->read(byteCount); 279 QByteArray buffer = m_process->read(byteCount);
280 std::string str(buffer.toStdString()); 280 std::string str(buffer.constData(), buffer.size());
281 if (str.size() > 0 && str[str.size()-1] == '\n') { 281 if (str.size() > 0 && str[str.size()-1] == '\n') {
282 str.resize(str.size()-1); 282 str.resize(str.size()-1);
283 } 283 }
284 m_logger->log("Piper server stderr output follows:\n" + str); 284 m_logger->log("Piper server stderr output follows:\n" + str);
285 m_logger->log("Piper server stderr output ends"); 285 m_logger->log("Piper server stderr output ends");