summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-031-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| * Allow qDebug output to be configured by qSetMessagePattern()Kai Koehne2012-04-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qSetMessagePattern() to configure the default message pattern. This one can still be overwritten by setting the QT_MESSAGE_PATTERN environment variable. Without this method, there's actually no way to change the default output programatically. Since QT_MESSAGE_PATTERN is evaluated when the first message arrives, setting it via e.g. qputenv might have no effect/be too late. Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Logging: Change arguments of message handler to avoid conversionsKai Koehne2012-04-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new QtMessageHandler that takes QString instead of char *: This avoids converting to local8bit , only to convert it back to utf16 for Windows. The old QMessageHandler is kept for a transition period, but will be removed before Qt 5.0. Also fix qEmergencyOut (that is called in OOM situations) to not rely on the default message handler. Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Mark qt_assert and qFatal as non-returning functions (excpt. MSVC)Thiago Macieira2012-04-191-0/+4
|/ | | | | | | | | | | | | | | | | | | This allows the compiler to optimise the code a bit better: since they don't return, it can assume in the code after the Q_ASSERT that the condition was true. MSVC is the exception: with MSVC, we have the CrtDbgReport dialog, which allows the developer to continue execution, inside the debugger. Therefore, we can't mark any of those functions as non-returning because they can, after all, return. Unfortunately, the Q_ASSERT usually expands to no code in release mode, so the improvement in code generation happens in debug mode only... Change-Id: I4d542d6853cd51c71ffab1d563ed64ef7c419115 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prepare category logging for Qt integrationWolfgang Beck2012-04-031-5/+9
| | | | | | | Change-Id: I0c784a945fe87d7ba52a44f5c7246de1709ae888 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Peter Yard <peter.yard@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Reshuffle code between qglobal, qloggingKai Koehne2012-02-131-5/+9
| | | | | | | Make the content of the .h, .cpp files match. Change-Id: Ib2506aeff74281ec4bcbf04d21da451038391203 Reviewed-by: David Faure <faure@kde.org>
* Fix compilation with -Werror -WshadowDavid Faure2012-02-081-2/+2
| | | | | Change-Id: I2ef8f288415820fa08e5bab8b99a00b1ad0f2988 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDebug: Include file, line, function informationKai Koehne2012-02-011-0/+161
Record the file, line, and function where a qDebug, qWarning, qCritical or qFatal call happens, and make this information available in a custom message handler. The patch uses the C preprocessor to replace qDebug, qWarning, ... with a line that also records the current file, line, and function. Custom message handlers can access this information via a new QMessageLogContext argument. Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d Reviewed-by: David Faure <faure@kde.org>