From 5cfff4988276aa2981c8fc833a760206e3aa3370 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 1 Jun 2011 19:43:49 +0200 Subject: remove Translator::translatedMessages() it's inefficient to construct a new list. on top of that, the only user actually checks the message state again. (cherry picked from commit 8a5d0e6c3d1cf6b269f755a8d54b25b704ba8356) Change-Id: I54159bc041fa5188affb1d54862f742c1e445628 Reviewed-on: http://codereview.qt-project.org/4610 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- src/linguist/shared/simtexth.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/linguist/shared/simtexth.cpp') diff --git a/src/linguist/shared/simtexth.cpp b/src/linguist/shared/simtexth.cpp index 31253d657..89335071f 100644 --- a/src/linguist/shared/simtexth.cpp +++ b/src/linguist/shared/simtexth.cpp @@ -238,9 +238,7 @@ CandidateList similarTextHeuristicCandidates(const Translator *tor, QList scores; CandidateList candidates; - TML all = tor->translatedMessages(); - - foreach (const TranslatorMessage &mtm, all) { + foreach (const TranslatorMessage &mtm, tor->messages()) { if (mtm.type() == TranslatorMessage::Unfinished || mtm.translation().isEmpty()) continue; -- cgit v1.2.1