diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-04-01 13:41:21 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-04-08 08:36:57 +0000 |
commit | c3f5744d2e0a2cd907c0601240d188b583ae79cb (patch) | |
tree | 1894ba867a12f77a4927d8c20549ae537556e555 /src/libs/installer/packagemanagercore_p.cpp | |
parent | ce703ed61b42bebe1e43a0e2ee00e815503edf20 (diff) |
Don't mix iterator and const_iterator
Add QT_STRICT_ITERATORS to disallow implicit conversions
between iterator and const_iterator. This avoids potential
detaches of the Qt containers.
Change-Id: I79d381f531ddda9ac402c6f5c63cdc7c6808a0bd
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagercore_p.cpp')
-rw-r--r-- | src/libs/installer/packagemanagercore_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index c4210644c..a97c83226 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -343,7 +343,7 @@ bool PackageManagerCorePrivate::buildComponentTree(QHash<QString, Component*> &c return false; // append all components to their respective parents QHash<QString, Component*>::const_iterator it; - for (it = components.begin(); it != components.end(); ++it) { + for (it = components.constBegin(); it != components.constEnd(); ++it) { QString id = it.key(); QInstaller::Component *component = it.value(); while (!id.isEmpty() && component->parentComponent() == 0) { |