From: Nguyễn Hồng Quân Date: Sun, 28 Oct 2012 05:22:25 +0000 (+0700) Subject: Change where the freVerDic variable initializes. X-Git-Url: http://git.maemo.org/git/?p=mverbiste;a=commitdiff_plain;h=cc80761bdb1c9e1dd83d7713ec77e215051dc534 Change where the freVerDic variable initializes. --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 43f6e29..f5a38aa 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -112,6 +112,15 @@ void MainWindow::showExpanded() void MainWindow::initverbiste() { langCode = "fr"; + + FrenchVerbDictionary::Language lang = FrenchVerbDictionary::parseLanguageCode(langCode); + if (lang != FrenchVerbDictionary::FRENCH) + { + // TODO: If lang code is not supported? + } + + /* Create verb dictionary, accept non-accent input */ + freVerbDic = new FrenchVerbDictionary(true); } void MainWindow::startLookup() @@ -123,15 +132,6 @@ void MainWindow::startLookup() QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); QString input = wordinput->text(); - FrenchVerbDictionary::Language lang = FrenchVerbDictionary::parseLanguageCode(langCode); - if (lang != FrenchVerbDictionary::FRENCH) - { - // TODO: If lang code is not supported? - } - - /* Create verb dictionary, accept non-accent input */ - freVerbDic = new FrenchVerbDictionary(true); - /* Get input word to look up */ const std::string word = input.toLower().toUtf8().constData();