Testlib: Disable gcc warning about deprecated qInstallMsgHandler
Fix warning: 'void (* qInstallMsgHandler(QtMsgHandler))(QtMsgType, const char*)' is deprecated (declared at qtestlog.cpp:85) [-Wdeprecated-declarations] Change-Id: I28d2baf696fdeddec90780edc88574fc368468db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>bb10
parent
a5e95ce39e
commit
e27a588643
|
|
@ -238,6 +238,12 @@ namespace QTest {
|
|||
return false;
|
||||
}
|
||||
|
||||
// don't warn about qInstallMsgHandler
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
static void messageHandler(QtMsgType type, const char *msg)
|
||||
{
|
||||
static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(QTest::maxWarnings);
|
||||
|
|
@ -287,6 +293,10 @@ namespace QTest {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
void QTestLog::enterTestFunction(const char* function)
|
||||
|
|
|
|||
Loading…
Reference in New Issue