Commit 78057f09 authored by Alexander Drozdov's avatar Alexander Drozdov Committed by hjk

BareMetal: fix GDB Server Providers settings lost

Fix GDB Servier Providers settings lost when Ok or Apply button pressed
twice. Also, fix crash (SIGSEGV) on Server Provider deletion.

Change-Id: Ib186fe388daf1ea502063e661aebf2fb3f688ccc
Reviewed-by: default avatarTim Sander <tim@krieglstein.org>
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 4e7d4ff8
......@@ -135,8 +135,7 @@ GdbServerProviderConfigWidget *GdbServerProviderModel::widget(
void GdbServerProviderModel::apply()
{
// Remove unused providers
foreach (TreeItem *item, rootItem()->children()) {
auto n = static_cast<GdbServerProviderNode *>(item);
foreach (GdbServerProviderNode *n, m_toRemoveNodes) {
GdbServerProviderManager::instance()->deregisterProvider(n->provider);
}
QTC_CHECK(m_toRemoveNodes.isEmpty());
......@@ -212,8 +211,6 @@ void GdbServerProviderModel::markForRemoval(GdbServerProvider *provider)
} else {
m_toRemoveNodes.append(n);
}
emit endRemoveRows();
}
void GdbServerProviderModel::markForAddition(GdbServerProvider *provider)
......
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