Remove Qt warnings

This commit is contained in:
Exeldro 2024-11-14 15:18:32 +01:00
parent 67182d2721
commit dd32d29222
No known key found for this signature in database
GPG Key ID: 97269A83FC715751

View File

@ -99,10 +99,12 @@ void RemoveWidget(QWidget *widget)
if (!widget) if (!widget)
return; return;
if (widget->layout()) { if (widget->layout()) {
while (QLayoutItem *item = widget->layout()->takeAt(0)) { auto l = widget->layout();
QLayoutItem *item;
while (l->count() > 0 && (item = l->takeAt(0))) {
RemoveLayoutItem(item); RemoveLayoutItem(item);
} }
delete widget->layout(); delete l;
} }
delete widget; delete widget;
} }