Assign a parent to QConnmanServiceInterface instances

Makes sure they are properly deleted.

Change-Id: I60a64c43456308ad9b6d8d0e3e8cbef8c2afb43e
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
This commit is contained in:
Jakub Adam 2014-06-04 08:19:18 +02:00 committed by The Qt Project
parent 4a6df5ec95
commit 61449e8b59

View File

@ -513,7 +513,7 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath)
{
QMutexLocker locker(&mutex);
if (!connmanServiceInterfaces.contains(servicePath)) {
QConnmanServiceInterface *serv = new QConnmanServiceInterface(servicePath);
QConnmanServiceInterface *serv = new QConnmanServiceInterface(servicePath, this);
connmanServiceInterfaces.insert(serv->path(),serv);
}