From 46fc33d9147c843d122d8384ab9c1465ef716ee1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 1 Apr 2015 11:19:32 +0200 Subject: Don't mix iterator and const_iterator This avoids unnecessary detaches of the Qt container data. The mismatches where detected by defining QT_STRICT_ITERATORS; however, this define violates the ODR (causing linker errors), and therefore is not added permanently. Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c GPush-Base: 62b0848b9cf357bcded4184c71d490bae56c773b Reviewed-by: Daniel Teske --- src/plugins/valgrind/xmlprotocol/parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/valgrind/xmlprotocol/parser.cpp') diff --git a/src/plugins/valgrind/xmlprotocol/parser.cpp b/src/plugins/valgrind/xmlprotocol/parser.cpp index 924e363cd9..95114578bd 100644 --- a/src/plugins/valgrind/xmlprotocol/parser.cpp +++ b/src/plugins/valgrind/xmlprotocol/parser.cpp @@ -294,7 +294,7 @@ void Parser::Private::checkProtocolVersion(const QString &versionStr) void Parser::Private::checkTool(const QString &reportedStr) { - const QHash::ConstIterator reported = toolsByName.find(reportedStr); + const QHash::ConstIterator reported = toolsByName.constFind(reportedStr); if (reported == toolsByName.constEnd()) throw ParserException(QCoreApplication::translate("Valgrind::XmlProtocol::Parser", @@ -353,7 +353,7 @@ XauxWhat Parser::Private::parseXauxWhat() MemcheckErrorKind Parser::Private::parseMemcheckErrorKind(const QString &kind) { - const QHash::ConstIterator it = errorKindsByName_memcheck.find(kind); + const QHash::ConstIterator it = errorKindsByName_memcheck.constFind(kind); if (it != errorKindsByName_memcheck.constEnd()) return *it; else @@ -363,7 +363,7 @@ MemcheckErrorKind Parser::Private::parseMemcheckErrorKind(const QString &kind) HelgrindErrorKind Parser::Private::parseHelgrindErrorKind(const QString &kind) { - const QHash::ConstIterator it = errorKindsByName_helgrind.find(kind); + const QHash::ConstIterator it = errorKindsByName_helgrind.constFind(kind); if (it != errorKindsByName_helgrind.constEnd()) return *it; else @@ -373,7 +373,7 @@ HelgrindErrorKind Parser::Private::parseHelgrindErrorKind(const QString &kind) PtrcheckErrorKind Parser::Private::parsePtrcheckErrorKind(const QString &kind) { - const QHash::ConstIterator it = errorKindsByName_ptrcheck.find(kind); + const QHash::ConstIterator it = errorKindsByName_ptrcheck.constFind(kind); if (it != errorKindsByName_ptrcheck.constEnd()) return *it; else -- cgit v1.2.1