From 90cce0a3705fcd4c5adaa93fda50a82a77b3ce86 Mon Sep 17 00:00:00 2001 From: Gres Date: Fri, 9 Oct 2015 23:34:03 +0300 Subject: [PATCH] Added translator debug mode. --- Settings.h | 2 ++ WebTranslator.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Settings.h b/Settings.h index e80a1bf..040bba5 100644 --- a/Settings.h +++ b/Settings.h @@ -25,6 +25,7 @@ namespace settings_names { const QString sourceLanguage = "source_language"; const QString translationLanguage = "translation_language"; const QString translationTimeout = "translation_timeout"; + const QString translationDebugMode = "translation_debug"; const QString translators = "translators"; } @@ -50,6 +51,7 @@ namespace settings_values { const QString sourceLanguage = "auto"; const QString translationLanguage = "ru"; const int translationTimeout = 15; // secs + const bool translationDebugMode = false; const QString translators = ""; } diff --git a/WebTranslator.cpp b/WebTranslator.cpp index e4ac24d..9166f95 100644 --- a/WebTranslator.cpp +++ b/WebTranslator.cpp @@ -128,6 +128,8 @@ void WebTranslator::applySettings () { if (!translatorHelper_->gotScripts ()) { emit error (tr ("Нет сценариев для перевода. Измените настройки.")); } + bool debugMode = GET (translationDebugMode).toBool (); + setDebugMode (debugMode); #undef GET }