Fix compiler warning about deprecated API

Explicitly disable warnings about qInstallMsgHandler being deprecated.
We have to use it in testlib to not break test cases still using it.

Change-Id: Icf7eb6c4d549f80ef45a4201fab2ac3eb03dda9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Kai Koehne 2013-04-22 11:56:45 +02:00 committed by The Qt Project
parent fffca846c1
commit f9b3b02360

View File

@ -399,6 +399,12 @@ void QTestLog::addBenchmarkResult(const QBenchmarkResult &result)
QTest::TestLoggers::addBenchmarkResult(result); QTest::TestLoggers::addBenchmarkResult(result);
} }
// 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
void QTestLog::startLogging() void QTestLog::startLogging()
{ {
QTest::TestLoggers::startLogging(); QTest::TestLoggers::startLogging();
@ -414,6 +420,10 @@ void QTestLog::stopLogging()
saveCoverageTool(QTestResult::currentAppname(), failCount() != 0, QTestLog::installedTestCoverage()); saveCoverageTool(QTestResult::currentAppname(), failCount() != 0, QTestLog::installedTestCoverage());
} }
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
# pragma GCC diagnostic pop
#endif
void QTestLog::addLogger(LogMode mode, const char *filename) void QTestLog::addLogger(LogMode mode, const char *filename)
{ {
if (filename && strcmp(filename, "-") == 0) if (filename && strcmp(filename, "-") == 0)