From 1bab5ae658410c2586d930a10abfb255cceef8e1 Mon Sep 17 00:00:00 2001 From: "\"Jean-Francois Dockes ext:(%22)" Date: Tue, 25 Sep 2012 15:40:11 +0200 Subject: [PATCH] temporary aspell suggest workaround --HG-- branch : CASEDIACSENS --- src/qtgui/reslist.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/qtgui/reslist.cpp b/src/qtgui/reslist.cpp index 9cbf037d..cd652c89 100644 --- a/src/qtgui/reslist.cpp +++ b/src/qtgui/reslist.cpp @@ -198,13 +198,18 @@ void QtGuiResListPager::suggest(const vectoruterms, // Actually, we may want to check the frequencies and propose something // anyway if a possible variation is much more common (as google does) #warning need to take case and diacs sensibility into account somehow - // Maybe use the xapian index instead ? How to retrieve the sensitivity flags ? - if (0) { - if (aspell->check(*uit, reason)) - continue; - else if (!reason.empty()) - return; - } + // Maybe use the xapian index instead ? How to retrieve the + // sensitivity flags ? + + // We used to call aspell->check() here and continue if it + // succeeded. but this does not work if we are in + // case-sensitive mode and the term was not found because of a + // case difference (our aspell is all lowercase). + // if (aspell->check(*uit, reason)) + // continue; + // else if (!reason.empty()) + // return; + if (!aspell->suggest(*rcldb, *uit, asuggs, reason)) { LOGERR(("QtGuiResListPager::suggest: aspell failed: %s\n", reason.c_str()));