From bf58fb44864a327e94648ddd52ed5c2d9b4a94c5 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 7 May 2016 11:44:47 +0300 Subject: [PATCH] Qt's but QTBUG-42846 "QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton)" was fixed. No need to hide the warning message anymore. (grafted from 465d6259962d52d03eca629bc059be1e594e9dd4) --HG-- branch : release --- src/app/tape/mapplication.cpp | 15 +++++++++++++-- src/app/valentina/core/vapplication.cpp | 15 +++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index f2acf0066..e52acc0f7 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -85,9 +85,20 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con } #if defined(Q_OS_MAC) - // Try hide very annoying, Qt related, warnings in Mac OS X +# 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 + // QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton) + // https://bugreports.qt.io/browse/QTBUG-42846 + if ((type == QtWarningMsg) && msg.contains("QNSView")) + { + type = QtDebugMsg; + } +# endif + + // Hide Qt bug 'Assertion when reading an icns file' + // https://bugreports.qt.io/browse/QTBUG-45537 // Remove after Qt fix will be released - if ((type == QtWarningMsg) && msg.contains("QNSView")) + if ((type == QtWarningMsg) && msg.contains("QICNSHandler::read()")) { type = QtDebugMsg; } diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index f2355020f..045e3bcef 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -81,12 +81,15 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con } #if defined(Q_OS_MAC) - // Try hide very annoying, Qt related, warnings in Mac OS X - // Remove after Qt fix will be released - if ((type == QtWarningMsg) && msg.contains("QNSView")) - { - type = QtDebugMsg; - } +# 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 + // QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton) + // https://bugreports.qt.io/browse/QTBUG-42846 + if ((type == QtWarningMsg) && msg.contains("QNSView")) + { + type = QtDebugMsg; + } +# endif // Hide Qt bug 'Assertion when reading an icns file' // https://bugreports.qt.io/browse/QTBUG-45537