summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/qt-ble.cpp3
-rw-r--r--profile-widget/tankitem.cpp4
2 files changed, 2 insertions, 5 deletions
diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp
index 9ee5def51..1cbd57266 100644
--- a/core/qt-ble.cpp
+++ b/core/qt-ble.cpp
@@ -142,8 +142,7 @@ BLEObject::~BLEObject()
{
qDebug() << "Deleting BLE object";
- foreach (QLowEnergyService *service, services)
- delete service;
+ qDeleteAll(services);
delete controller;
}
diff --git a/profile-widget/tankitem.cpp b/profile-widget/tankitem.cpp
index ff05ec1d0..2e2de6139 100644
--- a/profile-widget/tankitem.cpp
+++ b/profile-widget/tankitem.cpp
@@ -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;