summaryrefslogtreecommitdiffstats
path: root/src/activeqt/control/qaxserverbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/activeqt/control/qaxserverbase.cpp')
-rw-r--r--src/activeqt/control/qaxserverbase.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 663edf1..9b7fab8 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -642,7 +642,7 @@ public:
connections = old.connections;
that = old.that;
iid = old.iid;
- foreach (const CONNECTDATA &connection, connections)
+ for (const CONNECTDATA &connection : qAsConst(connections))
connection.pUnk->AddRef();
}
virtual ~QAxConnection()
@@ -842,8 +842,8 @@ QClassFactory::QClassFactory(CLSID clsid)
InitializeCriticalSection(&refCountSection);
// COM only knows the CLSID, but QAxFactory is class name based...
- QStringList keys = qAxFactory()->featureList();
- foreach (const QString &key, keys) {
+ const QStringList keys = qAxFactory()->featureList();
+ for (const QString &key : keys) {
if (qAxFactory()->classID(key) == clsid) {
className = key;
break;
@@ -1124,9 +1124,8 @@ QAxServerBase::~QAxServerBase()
#endif
revokeActiveObject();
-
- foreach (IConnectionPoint *point, points) {
- if (point)
+ for (auto it = points.cbegin(), end = points.cend(); it != end; ++it) {
+ if (IConnectionPoint *point = it.value())
point->Release();
}
delete aggregatedObject;
@@ -1342,7 +1341,7 @@ bool QAxServerBase::internalCreate()
if (isWidget) {
qt.object->installEventFilter(this);
const QWidgetList children = qt.object->findChildren<QWidget*>();
- foreach (QWidget *child, children)
+ for (QWidget *child : children)
child->installEventFilter(this);
}
return true;