Qt < 5.2 didn't feature categorized logging.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-04-02 17:01:05 +03:00
parent 49ffd7a77d
commit fb879c7ae1

View File

@ -2117,14 +2117,21 @@ QString VApplication::STDescription(const QString &id) const
//---------------------------------------------------------------------------------------------------------------------
void VApplication::StartLogging()
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
#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
#endif // QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
CreateLogDir();
BeginLogging();