From b7b1ea3db74b8e33c7398838a1cbf49c2b440a54 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 24 May 2016 13:06:51 +0300 Subject: [PATCH] Hide an error message "setGeometryDp: Unable to set geometry" for release builds. --HG-- branch : develop --- src/app/tape/mapplication.cpp | 8 ++++++++ src/app/valentina/core/vapplication.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index 3598b3c9c..a01addf1b 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -84,6 +84,14 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con type = QtWarningMsg; } +#if !defined(V_NO_DEBUG) + // I have decided to hide this annoing message for release builds. + if ((type == QtWarningMsg) && msg.contains("setGeometryDp: Unable to set geometry")) + { + type = QtDebugMsg; + } +#endif //!defined(V_NO_DEBUG) + #if defined(Q_OS_MAC) # if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0) // Try hide very annoying, Qt related, warnings in Mac OS X diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index f837ddc67..a50edb882 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -80,6 +80,14 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con type = QtWarningMsg; } +#if !defined(V_NO_DEBUG) + // I have decided to hide this annoing message for release builds. + if ((type == QtWarningMsg) && msg.contains("setGeometryDp: Unable to set geometry")) + { + type = QtDebugMsg; + } +#endif //!defined(V_NO_DEBUG) + #if defined(Q_OS_MAC) # if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0) // Try hide very annoying, Qt related, warnings in Mac OS X