forked from qt-creator/qt-creator
Fix gdbserver connecttion
Remove extra `:` character from empty scheme. Is needed to fix gdb target remote string from `tcp::<ip>:<port>` to `tcp:<ip>:<port>`. Fix baremetal channelString Change-Id: I169a93599419ee54c182973c2a1f734390f4a035 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
BogDan Vatra
parent
6da6aede61
commit
108dbb4dd3
@@ -73,6 +73,7 @@ void IDebugServerProvider::setChannel(const QUrl &channel)
|
||||
|
||||
void IDebugServerProvider::setChannel(const QString &host, int port)
|
||||
{
|
||||
m_channel.setScheme("tcp");
|
||||
m_channel.setHost(host);
|
||||
m_channel.setPort(port);
|
||||
}
|
||||
@@ -84,10 +85,7 @@ QUrl IDebugServerProvider::channel() const
|
||||
|
||||
QString IDebugServerProvider::channelString() const
|
||||
{
|
||||
// Just return as "host:port" form.
|
||||
if (m_channel.port() <= 0)
|
||||
return m_channel.host();
|
||||
return m_channel.host() + ':' + QString::number(m_channel.port());
|
||||
return m_channel.toString();
|
||||
}
|
||||
|
||||
QString IDebugServerProvider::id() const
|
||||
@@ -336,6 +334,7 @@ void HostWidget::setChannel(const QUrl &channel)
|
||||
QUrl HostWidget::channel() const
|
||||
{
|
||||
QUrl url;
|
||||
url.setScheme("tcp");
|
||||
url.setHost(m_hostLineEdit->text());
|
||||
url.setPort(m_portSpinBox->value());
|
||||
return url;
|
||||
|
@@ -4603,7 +4603,7 @@ static QString extractRemoteChannel(const QUrl &url, const QString &pipe)
|
||||
|
||||
QString scheme = url.scheme();
|
||||
if (scheme.isEmpty())
|
||||
scheme = "tcp:";
|
||||
scheme = "tcp";
|
||||
|
||||
// "Fix" the IPv6 case with host names without '['...']'
|
||||
QString host = url.host();
|
||||
|
Reference in New Issue
Block a user