Fixed issue #538. QSslSocket error messages during startup in newest development

build.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-03 14:54:18 +03:00
parent ce92d2994d
commit 0cdd058eb4
2 changed files with 18 additions and 8 deletions

View File

@ -84,13 +84,18 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
type = QtWarningMsg; type = QtWarningMsg;
} }
#if !defined(V_NO_ASSERT) #if defined(V_NO_ASSERT)
// I have decided to hide this annoing message for release builds. // I have decided to hide this annoing message for release builds.
if ((type == QtWarningMsg) && msg.contains(QStringLiteral("QSslSocket: cannot resolve")))
{
type = QtDebugMsg;
}
if ((type == QtWarningMsg) && msg.contains(QStringLiteral("setGeometry: Unable to set geometry"))) if ((type == QtWarningMsg) && msg.contains(QStringLiteral("setGeometry: Unable to set geometry")))
{ {
type = QtDebugMsg; type = QtDebugMsg;
} }
#endif //!defined(V_NO_ASSERT) #endif //defined(V_NO_ASSERT)
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
# if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0) # if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
@ -169,20 +174,20 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
switch (type) switch (type)
{ {
case QtWarningMsg: case QtWarningMsg:
messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Warning.")); messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Warning"));
messageBox.setIcon(QMessageBox::Warning); messageBox.setIcon(QMessageBox::Warning);
break; break;
case QtCriticalMsg: case QtCriticalMsg:
messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Critical error.")); messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Critical error"));
messageBox.setIcon(QMessageBox::Critical); messageBox.setIcon(QMessageBox::Critical);
break; break;
case QtFatalMsg: case QtFatalMsg:
messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Fatal error.")); messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Fatal error"));
messageBox.setIcon(QMessageBox::Critical); messageBox.setIcon(QMessageBox::Critical);
break; break;
#if QT_VERSION > QT_VERSION_CHECK(5, 4, 2) #if QT_VERSION > QT_VERSION_CHECK(5, 4, 2)
case QtInfoMsg: case QtInfoMsg:
messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Information.")); messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Information"));
messageBox.setIcon(QMessageBox::Information); messageBox.setIcon(QMessageBox::Information);
break; break;
#endif #endif

View File

@ -80,13 +80,18 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
type = QtWarningMsg; type = QtWarningMsg;
} }
#if !defined(V_NO_ASSERT) #if defined(V_NO_ASSERT)
// I have decided to hide this annoing message for release builds. // I have decided to hide this annoing message for release builds.
if ((type == QtWarningMsg) && msg.contains(QStringLiteral("QSslSocket: cannot resolve")))
{
type = QtDebugMsg;
}
if ((type == QtWarningMsg) && msg.contains(QStringLiteral("setGeometry: Unable to set geometry"))) if ((type == QtWarningMsg) && msg.contains(QStringLiteral("setGeometry: Unable to set geometry")))
{ {
type = QtDebugMsg; type = QtDebugMsg;
} }
#endif //!defined(V_NO_ASSERT) #endif //defined(V_NO_ASSERT)
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
# if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0) # if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0)