Convert Q_FOREACH loops to C++11 for loops.
Q_FOREACH will de deprecated soon.
This commit is contained in:
committed by
Jonathan White
parent
ad834f0f58
commit
fff9e7ac46
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "SignalMultiplexer.h"
|
||||
|
||||
#include "core/Global.h"
|
||||
|
||||
SignalMultiplexer::SignalMultiplexer()
|
||||
{
|
||||
}
|
||||
@@ -45,7 +47,7 @@ void SignalMultiplexer::setCurrentObject(QObject* object)
|
||||
}
|
||||
|
||||
if (m_currentObject) {
|
||||
Q_FOREACH (const Connection& con, m_connections) {
|
||||
for (const Connection& con : asConst(m_connections)) {
|
||||
disconnect(con);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +55,7 @@ void SignalMultiplexer::setCurrentObject(QObject* object)
|
||||
m_currentObject = object;
|
||||
|
||||
if (object) {
|
||||
Q_FOREACH (const Connection& con, m_connections) {
|
||||
for (const Connection& con : asConst(m_connections)) {
|
||||
connect(con);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user