forked from qt-creator/qt-creator
DiagnosticDelegate: Fix leaking QVBoxLayout
Change-Id: I523c2c13b2b7f2b2eebc00781b6a2e18a74f8c17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -234,12 +234,13 @@ QWidget *ClangStaticAnalyzerDiagnosticDelegate::createDetailsWidget(const QFont
|
|||||||
QWidget *parent) const
|
QWidget *parent) const
|
||||||
{
|
{
|
||||||
QWidget *widget = new QWidget(parent);
|
QWidget *widget = new QWidget(parent);
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
|
||||||
|
|
||||||
const Diagnostic diagnostic = index.data(Qt::UserRole).value<Diagnostic>();
|
const Diagnostic diagnostic = index.data(Qt::UserRole).value<Diagnostic>();
|
||||||
if (!diagnostic.isValid())
|
if (!diagnostic.isValid())
|
||||||
return widget;
|
return widget;
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
// Add summary label
|
// Add summary label
|
||||||
QLabel *summaryLineLabel = createSummaryLabel(diagnostic);
|
QLabel *summaryLineLabel = createSummaryLabel(diagnostic);
|
||||||
connect(summaryLineLabel, &QLabel::linkActivated,
|
connect(summaryLineLabel, &QLabel::linkActivated,
|
||||||
|
Reference in New Issue
Block a user