diff options
Diffstat (limited to 'src/macdeployqt/shared')
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index a248d8ccd..69d0ce8ca 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -530,12 +530,11 @@ QSet<QString> getBinaryRPaths(const QString &path, bool resolve = true, QString QString output = otool.readAllStandardOutput(); QStringList outputLines = output.split("\n"); - QStringListIterator i(outputLines); - while (i.hasNext()) { - if (i.next().contains("cmd LC_RPATH") && i.hasNext() && - i.next().contains("cmdsize") && i.hasNext()) { - const QString &rpathCmd = i.next(); + for (auto i = outputLines.cbegin(), end = outputLines.cend(); i != end; ++i) { + if (i->contains("cmd LC_RPATH") && ++i != end && + i->contains("cmdsize") && ++i != end) { + const QString &rpathCmd = *i; int pathStart = rpathCmd.indexOf("path "); int pathEnd = rpathCmd.indexOf(" ("); if (pathStart >= 0 && pathEnd >= 0 && pathStart < pathEnd) { |