diff options
author | Kai Koehne <kai.koehne@digia.com> | 2012-09-18 09:57:51 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-16 15:29:15 +0200 |
commit | 8fdef974b7014212947fc409543847d97ec7d5b9 (patch) | |
tree | 23fbe671fa5615ef06004b6df9565efc63fb6483 /src/testlib/qtestlog.cpp | |
parent | c40333ef505cf0cd9f1102f29473d920fdf7675d (diff) |
Logging: Mark deprecated API with QT_DEPRECATED
Still use it in qtestlib though because using qInstallMessageHandler
here would break all tests (still) using qInstallMsgHandler - Qt always
uses the new message handler if there's one, ignoring any message handler
installed through deprecated API.
Change-Id: I6fefefb315a2421425d2b7787e367fd348a33d83
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/testlib/qtestlog.cpp')
-rw-r--r-- | src/testlib/qtestlog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 7cd83c857d..c56a00237b 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -76,6 +76,14 @@ static void saveCoverageTool(const char * appname, bool testfailed, bool install #endif } +// +// declare deprecated API from qlogging.h locally +// (we can't use qInstallMessageHandler because it would break +// tests that (still) rely on qInstallMsgHandler.) +// +typedef void (*QtMsgHandler)(QtMsgType, const char *); +Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler); + namespace QTest { int fails = 0; |