From bea2a493f7f410407207aa0b2bc1a2837d43418d Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 23 Aug 2011 17:35:19 +0200 Subject: [PATCH] There is no need to duplicate and delete here, just use m_words --- core/textpage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/textpage.cpp b/core/textpage.cpp index fd656a9e0..eb242b170 100644 --- a/core/textpage.cpp +++ b/core/textpage.cpp @@ -1125,7 +1125,7 @@ QMap TextPagePrivate::makeWordFromCharacters() */ QMap word_chars_map; - const TextList tmpList = duplicateWordList(); + const TextList tmpList = m_words; TextList newList; TextList::ConstIterator it = tmpList.begin(), itEnd = tmpList.end(), tmpIt; @@ -1227,7 +1227,6 @@ QMap TextPagePrivate::makeWordFromCharacters() if(it == itEnd) break; } - qDeleteAll(tmpList); setWordList(newList); return word_chars_map;