Fixed support Qt 5.0.
--HG-- branch : develop
This commit is contained in:
parent
b28ac8e97b
commit
f370629af0
|
@ -62,13 +62,17 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
|
||||||
doc(nullptr),
|
doc(nullptr),
|
||||||
openingPattern(false)
|
openingPattern(false)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||||
QString rules;
|
QString rules;
|
||||||
|
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||||
|
|
||||||
#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)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
||||||
// Qt < 5.2 didn't feature categorized logging
|
// Qt < 5.2 didn't feature categorized logging
|
||||||
// Do nothing
|
// Do nothing
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// In Qt 5.2 need manualy enable debug information for categories. This work
|
// 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
|
// 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
|
// case will show our messages. Another situation with Qt 5.3 that has many debug
|
||||||
|
@ -79,6 +83,23 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
|
||||||
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 1)
|
||||||
|
#if defined(V_NO_ASSERT)
|
||||||
|
// Ignore SSL-related warnings
|
||||||
|
// See issue #528: Error: QSslSocket: cannot resolve SSLv2_client_method.
|
||||||
|
rules += QLatin1String("qt.network.ssl.warning=false\n");
|
||||||
|
// See issue #568: Certificate checking on Mac OS X.
|
||||||
|
rules += QLatin1String("qt.network.ssl.critical=false\n");
|
||||||
|
#endif //defined(V_NO_ASSERT)
|
||||||
|
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 4, 1)
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||||
|
if (not rules.isEmpty())
|
||||||
|
{
|
||||||
|
QLoggingCategory::setFilterRules(rules);
|
||||||
|
}
|
||||||
|
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
|
||||||
// Enable support for HiDPI bitmap resources
|
// Enable support for HiDPI bitmap resources
|
||||||
setAttribute(Qt::AA_UseHighDpiPixmaps);
|
setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
@ -91,21 +112,6 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
|
||||||
// Connect this slot with VApplication::aboutToQuit.
|
// Connect this slot with VApplication::aboutToQuit.
|
||||||
Settings()->sync();
|
Settings()->sync();
|
||||||
});
|
});
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 1)
|
|
||||||
#if defined(V_NO_ASSERT)
|
|
||||||
// Ignore SSL-related warnings
|
|
||||||
// See issue #528: Error: QSslSocket: cannot resolve SSLv2_client_method.
|
|
||||||
rules += QLatin1String("qt.network.ssl.warning=false\n");
|
|
||||||
// See issue #568: Certificate checking on Mac OS X.
|
|
||||||
rules += QLatin1String("qt.network.ssl.critical=false\n");
|
|
||||||
#endif //defined(V_NO_ASSERT)
|
|
||||||
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 4, 1)
|
|
||||||
|
|
||||||
if (not rules.isEmpty())
|
|
||||||
{
|
|
||||||
QLoggingCategory::setFilterRules(rules);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user