forked from qt-creator/qt-creator
LanguageClient: Fix possbible crash in inspector
... when clearing. Change-Id: Iadb57c07562fab77a65bcad38cf509dd1af6c0c3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -431,6 +431,7 @@ LspInspectorWidget::LspInspectorWidget(LspInspector *inspector)
|
|||||||
const auto clearButton = buttonBox->addButton(tr("Clear"), QDialogButtonBox::ResetRole);
|
const auto clearButton = buttonBox->addButton(tr("Clear"), QDialogButtonBox::ResetRole);
|
||||||
connect(clearButton, &QPushButton::clicked, this, [this] {
|
connect(clearButton, &QPushButton::clicked, this, [this] {
|
||||||
m_inspector->clear();
|
m_inspector->clear();
|
||||||
|
if (m_clients->currentItem())
|
||||||
currentClientChanged(m_clients->currentItem()->text());
|
currentClientChanged(m_clients->currentItem()->text());
|
||||||
});
|
});
|
||||||
mainLayout->addWidget(buttonBox);
|
mainLayout->addWidget(buttonBox);
|
||||||
|
Reference in New Issue
Block a user