forked from qt-creator/qt-creator
SerialTerminal: Show error string on connection failure
Change-Id: Ie951d9598358ef87ea50d6b748b1a88d3ba5431d Reviewed-by: Benjamin Balga <balga.benjamin@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
ce1fe8f513
commit
e0a1b171f1
@@ -63,8 +63,11 @@ bool SerialControl::start()
|
||||
stop();
|
||||
|
||||
if (!m_serialPort.open(QIODevice::ReadWrite)) {
|
||||
if (!m_retrying)
|
||||
appendMessage(tr("Unable to open port %1.").arg(portName()) + "\n", Utils::ErrorMessageFormat);
|
||||
if (!m_retrying) {
|
||||
appendMessage(tr("Unable to open port %1: %2.")
|
||||
.arg(portName(), m_serialPort.errorString()),
|
||||
Utils::ErrorMessageFormat);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user