From 020dbb01b0536d7566016c6f8e0a7f7bae3f0752 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?= Date: Wed, 14 Nov 2012 14:54:57 +0700 Subject: [PATCH] Delete some debug symbols --- gui/conjugation.cpp | 14 ++++---------- gui/conjugation.h | 11 ++++------- mainwindow.cpp | 31 +------------------------------ 3 files changed, 9 insertions(+), 47 deletions(-) diff --git a/gui/conjugation.cpp b/gui/conjugation.cpp index 781a76a..6cf0a65 100644 --- a/gui/conjugation.cpp +++ b/gui/conjugation.cpp @@ -35,17 +35,11 @@ using namespace verbiste; 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; diff --git a/gui/conjugation.h b/gui/conjugation.h index 411dcc9..88062c8 100644 --- a/gui/conjugation.h +++ b/gui/conjugation.h @@ -50,13 +50,10 @@ typedef std::vector VVVS; 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. diff --git a/mainwindow.cpp b/mainwindow.cpp index 05b75ff..54b2d50 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -190,10 +190,6 @@ void MainWindow::startLookup() 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); @@ -205,34 +201,13 @@ void MainWindow::startLookup() { 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; } - /* 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; -#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 @@ -243,10 +218,6 @@ void MainWindow::startLookup() } 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); -- 1.7.9.5