From 7a95b52cd09c10c6162d99567471ec437b818177 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 3 Oct 2015 17:03:25 +0300 Subject: [PATCH] Enable debug information Valentina and Tape from one place. --HG-- branch : develop --- src/app/valentina/core/vapplication.cpp | 16 ---------------- src/libs/vmisc/vabstractapplication.cpp | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 0893b5326..c4392db34 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -580,22 +580,6 @@ QStringList VApplication::LabelLanguages() //--------------------------------------------------------------------------------------------------------------------- void VApplication::StartLogging() { -#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) - -#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) - // Qt < 5.2 didn't feature categorized logging - // Do nothing -#else - // In Qt 5.2 need manualy enable debug information for categories. This work - // because Qt doesn't provide debug information for categories itself. And in this - // case will show our messages. Another situation with Qt 5.3 that has many debug - // messages itself. We don't need this information and can turn on later if need. - // But here Qt already show our debug messages without enabling. - QLoggingCategory::setFilterRules("*.debug=true\n"); -#endif // QT_VERSION < QT_VERSION_CHECK(5, 2, 0) - -#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0) - CreateLogDir(); BeginLogging(); ClearOldLogs(); diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 03727f944..65a90bec8 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -47,7 +47,23 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv) sceneView(nullptr), doc(nullptr), openingPattern(false) -{} +{ +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + +#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) + // Qt < 5.2 didn't feature categorized logging + // Do nothing +#else + // In Qt 5.2 need manualy enable debug information for categories. This work + // because Qt doesn't provide debug information for categories itself. And in this + // case will show our messages. Another situation with Qt 5.3 that has many debug + // messages itself. We don't need this information and can turn on later if need. + // But here Qt already show our debug messages without enabling. + QLoggingCategory::setFilterRules("*.debug=true\n"); +#endif // QT_VERSION < QT_VERSION_CHECK(5, 2, 0) + +#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0) +} //--------------------------------------------------------------------------------------------------------------------- VAbstractApplication::~VAbstractApplication()