Delete some debug symbols
authorNguyễn Hồng Quân <ng.hong.quan@gmail.com>
Wed, 14 Nov 2012 07:54:57 +0000 (14:54 +0700)
committerNguyễn Hồng Quân <ng.hong.quan@gmail.com>
Wed, 14 Nov 2012 07:54:57 +0000 (14:54 +0700)
gui/conjugation.cpp
gui/conjugation.h
mainwindow.cpp

index 781a76a..6cf0a65 100644 (file)
@@ -35,17 +35,11 @@ using namespace verbiste;
 
 void
 getConjugation(const FrenchVerbDictionary &fvd,
 
 void
 getConjugation(const FrenchVerbDictionary &fvd,
-                        const string &infinitive,
-                        const string &tname,
-                        VVVS &dest,
-               #ifndef QT_NO_DEBUG
-               QElapsedTimer &timer,
-               #endif
-                        bool includePronouns)
+               const string &infinitive,
+               const string &tname,
+               VVVS &dest,
+               bool includePronouns)
 {
 {
-#ifndef QT_NO_DEBUG
-        qDebug() << " *>> Inside getConjugation " << timer.elapsed();
-#endif
     const TemplateSpec *templ = fvd.getTemplate(tname);
     if (templ == NULL)
         return;
     const TemplateSpec *templ = fvd.getTemplate(tname);
     if (templ == NULL)
         return;
index 411dcc9..88062c8 100644 (file)
@@ -50,13 +50,10 @@ typedef std::vector<VVS> VVVS;
                             modes where pronouns are used
 */
 void getConjugation(const verbiste::FrenchVerbDictionary &fvd,
                             modes where pronouns are used
 */
 void getConjugation(const verbiste::FrenchVerbDictionary &fvd,
-                        const std::string &infinitive,
-                        const std::string &tname,
-                        VVVS &dest,
-                    #ifndef QT_NO_DEBUG
-                        QElapsedTimer &timer,
-                    #endif
-                        bool includePronouns = false);
+                    const std::string &infinitive,
+                    const std::string &tname,
+                    VVVS &dest,
+                    bool includePronouns = false);
 
 
 /** Get the tense name for a certain cell of the conjugation table.
 
 
 /** Get the tense name for a certain cell of the conjugation table.
index 05b75ff..54b2d50 100644 (file)
@@ -190,10 +190,6 @@ void MainWindow::startLookup()
     bool includePronouns = btnPron->isChecked();
     bool isItalian = filItalian->isChecked();          // TODO: Will get this value from external
 
     bool includePronouns = btnPron->isChecked();
     bool isItalian = filItalian->isChecked();          // TODO: Will get this value from external
 
-#ifndef QT_NO_DEBUG
-    timer.start();
-    qDebug() << "Start " << timer.elapsed();
-#endif
     freVerbDic->deconjugate(word, infles);
 
     resultPages->setUpdatesEnabled(false);
     freVerbDic->deconjugate(word, infles);
 
     resultPages->setUpdatesEnabled(false);
@@ -205,34 +201,13 @@ void MainWindow::startLookup()
     {
         const InflectionDesc &d = *it;
 
     {
         const InflectionDesc &d = *it;
 
-#ifndef QT_NO_DEBUG
-        qDebug() << ">> Infinitive " << d.infinitive.c_str();
-        qDebug() << "   Template " << d.templateName.c_str();
-#endif
         /* If this infinitive has been conjugated, we skip to the next infinitive */
         if (d.infinitive == prevUTF8Infinitive && d.templateName == prevTemplateName) {
             continue;
         }
         /* If this infinitive has been conjugated, we skip to the next infinitive */
         if (d.infinitive == prevUTF8Infinitive && d.templateName == prevTemplateName) {
             continue;
         }
-        /* FIXME:
-         * In original source (Verbiste), this checking is done later,
-         * after getConjugation(). I place it here to avoid calling again
-         * multitimes getConjugation(), which is very slow.
-         * We need to test more to see which place is more correct.
-         */
 
         VVVS conjug;
 
         VVVS conjug;
-#ifndef QT_NO_DEBUG
-        qDebug() << "   START getConjugation " << timer.elapsed();
-#endif
-        getConjugation(*freVerbDic, d.infinitive, d.templateName, conjug,
-               #ifndef QT_NO_DEBUG
-                       timer,
-               #endif
-                       includePronouns);
-
-#ifndef QT_NO_DEBUG
-        qDebug() << "   getConjugation() returns: " << timer.elapsed();
-#endif
+        getConjugation(*freVerbDic, d.infinitive, d.templateName, conjug, includePronouns);
 
         if (conjug.size() == 0           // if no tenses
             || conjug[0].size() == 0     // if no infinitive tense
 
         if (conjug.size() == 0           // if no tenses
             || conjug[0].size() == 0     // if no infinitive tense
@@ -243,10 +218,6 @@ void MainWindow::startLookup()
         }
 
         std::string utf8Infinitive = conjug[0][0][0];
         }
 
         std::string utf8Infinitive = conjug[0][0][0];
-#ifndef QT_NO_DEBUG
-        qDebug() << "     Infinitive " << utf8Infinitive.c_str();
-        qDebug() << "     Template " << d.templateName.c_str();
-#endif
 
         /* Add result to GUI (not show yet) */
         ResultPage *rsp = addResultPage(utf8Infinitive);
 
         /* Add result to GUI (not show yet) */
         ResultPage *rsp = addResultPage(utf8Infinitive);