Commit bea2a493 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

There is no need to duplicate and delete here, just use m_words

parent dec47336
......@@ -1125,7 +1125,7 @@ QMap<int, RegionText> TextPagePrivate::makeWordFromCharacters()
*/
QMap<int, RegionText> 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<int, RegionText> TextPagePrivate::makeWordFromCharacters()
if(it == itEnd) break;
}
qDeleteAll(tmpList);
setWordList(newList);
return word_chars_map;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment