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/texteditor/snippets/snippetscollection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/texteditor/snippets/snippetscollection.cpp') diff --git a/src/plugins/texteditor/snippets/snippetscollection.cpp b/src/plugins/texteditor/snippets/snippetscollection.cpp index 44ceb92c6f..235eff9989 100644 --- a/src/plugins/texteditor/snippets/snippetscollection.cpp +++ b/src/plugins/texteditor/snippets/snippetscollection.cpp @@ -207,7 +207,7 @@ int SnippetsCollection::totalActiveSnippets(const QString &groupId) const { const int group = groupIndex(groupId); return std::distance::const_iterator>(m_snippets.at(group).begin(), - m_activeSnippetsEnd.at(group)); + QList::const_iterator(m_activeSnippetsEnd.at(group))); } int SnippetsCollection::totalSnippets(const QString &groupId) const -- cgit v1.2.1