use qDeleteAll()

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
Rolf Eike Beer 2019-04-03 20:25:35 +02:00 committed by Dirk Hohndel
parent e3d43b5696
commit cf86ece73e
2 changed files with 2 additions and 5 deletions

View file

@ -142,8 +142,7 @@ BLEObject::~BLEObject()
{
qDebug() << "Deleting BLE object";
foreach (QLowEnergyService *service, services)
delete service;
qDeleteAll(services);
delete controller;
}

View file

@ -89,9 +89,7 @@ void TankItem::modelDataChanged(const QModelIndex&, const QModelIndex&)
return;
// remove the old rectangles
foreach (QGraphicsRectItem *r, rects) {
delete(r);
}
qDeleteAll(rects);
rects.clear();
qreal width, left;