Aggregation: Use Qt5-style connects

Change-Id: Ifee501f2da7d2834f6ce8a63f85e9fab9c683b5d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Orgad Shaneh
2016-05-31 22:36:09 +03:00
committed by Orgad Shaneh
parent 9370e863f8
commit 4ed9b68fbf
4 changed files with 7 additions and 8 deletions

View File

@@ -203,7 +203,7 @@ Aggregate::~Aggregate()
{
QWriteLocker locker(&lock());
foreach (QObject *component, m_components) {
disconnect(component, SIGNAL(destroyed(QObject*)), this, SLOT(deleteSelf(QObject*)));
disconnect(component, &QObject::destroyed, this, &Aggregate::deleteSelf);
aggregateMap().remove(component);
}
components = m_components;
@@ -246,7 +246,7 @@ void Aggregate::add(QObject *component)
return;
}
m_components.append(component);
connect(component, SIGNAL(destroyed(QObject*)), this, SLOT(deleteSelf(QObject*)));
connect(component, &QObject::destroyed, this, &Aggregate::deleteSelf);
aggregateMap().insert(component, this);
}
emit changed();
@@ -267,7 +267,7 @@ void Aggregate::remove(QObject *component)
QWriteLocker locker(&lock());
aggregateMap().remove(component);
m_components.removeAll(component);
disconnect(component, SIGNAL(destroyed(QObject*)), this, SLOT(deleteSelf(QObject*)));
disconnect(component, &QObject::destroyed, this, &Aggregate::deleteSelf);
}
emit changed();
}