Change the debug directive.
[mverbiste] / mainwindow.cpp
index 43f6e29..08bb3f9 100644 (file)
@@ -3,9 +3,6 @@
 #include "gui/conjugation.h"
 
 #include <QtCore/QCoreApplication>
-#ifdef DEBUG
-#include <QDebug>
-#endif
 
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent), ui(new Ui::MainWindow)
@@ -112,6 +109,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 +129,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();