Commit cf277acb authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

BareMetal: Refresh provider list on host change



Change-Id: Id3023a649d5d80fef71cadd53167caa22d01c2c9
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent de3b2b64
...@@ -59,6 +59,29 @@ DefaultGdbServerProvider::DefaultGdbServerProvider(const DefaultGdbServerProvide ...@@ -59,6 +59,29 @@ DefaultGdbServerProvider::DefaultGdbServerProvider(const DefaultGdbServerProvide
{ {
} }
quint16 DefaultGdbServerProvider::port() const
{
return m_port;
}
void DefaultGdbServerProvider::setPort(const quint16 &port)
{
m_port = port;
}
QString DefaultGdbServerProvider::host() const
{
return m_host;
}
void DefaultGdbServerProvider::setHost(const QString &host)
{
if (m_host == host)
return;
m_host = host;
providerUpdated();
}
QString DefaultGdbServerProvider::typeDisplayName() const QString DefaultGdbServerProvider::typeDisplayName() const
{ {
return DefaultGdbServerProviderFactory::tr("Default"); return DefaultGdbServerProviderFactory::tr("Default");
...@@ -183,8 +206,8 @@ void DefaultGdbServerProviderConfigWidget::applyImpl() ...@@ -183,8 +206,8 @@ void DefaultGdbServerProviderConfigWidget::applyImpl()
auto p = static_cast<DefaultGdbServerProvider *>(provider()); auto p = static_cast<DefaultGdbServerProvider *>(provider());
Q_ASSERT(p); Q_ASSERT(p);
p->m_host = m_hostWidget->host(); p->setHost(m_hostWidget->host());
p->m_port = m_hostWidget->port(); p->setPort(m_hostWidget->port());
p->setInitCommands(m_initCommandsTextEdit->toPlainText()); p->setInitCommands(m_initCommandsTextEdit->toPlainText());
p->setResetCommands(m_resetCommandsTextEdit->toPlainText()); p->setResetCommands(m_resetCommandsTextEdit->toPlainText());
} }
......
...@@ -56,6 +56,12 @@ public: ...@@ -56,6 +56,12 @@ public:
bool isValid() const; bool isValid() const;
QString host() const;
void setHost(const QString &host);
quint16 port() const;
void setPort(const quint16 &port);
private: private:
explicit DefaultGdbServerProvider(); explicit DefaultGdbServerProvider();
explicit DefaultGdbServerProvider(const DefaultGdbServerProvider &); explicit DefaultGdbServerProvider(const DefaultGdbServerProvider &);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment