|
typedef void(* | Tp::DebugCallback) (const QString &libraryName, const QString &libraryVersion, QtMsgType type, const QString &msg) |
|
TelepathyQt has an internal mechanism for displaying debugging output. It uses the Qt debugging subsystem, so if you want to redirect the messages, use qInstallMsgHandler() from <QtGlobal>.
Debugging output is divided into two categories: normal debug output and warning messages. Normal debug output results in the normal operation of the library, warning messages are output only when something goes wrong. Each category can be invidually enabled.
◆ DebugCallback
const QString &libraryVersion,
QtMsgType type,
const QString &msg)
◆ enableDebug()
void Tp::enableDebug |
( |
bool |
enable | ) |
|
Enable or disable normal debug output from the library. If the library is not compiled with debug support enabled, this has no effect; no output is produced in any case.
The default is false
ie. no debug output.
- Parameters
-
enable | Whether debug output should be enabled or not. |
◆ enableWarnings()
void Tp::enableWarnings |
( |
bool |
enable | ) |
|
Enable or disable warning output from the library. If the library is not compiled with debug support enabled, this has no effect; no output is produced in any case.
The default is true
ie. warning output enabled.
- Parameters
-
enable | Whether warnings should be enabled or not. |
◆ setDebugCallback()
Set the callback method that will handle the debug output.
If cb
is NULL this method will set the defaultDebugCallback instead. The default callback function will print the output using default Qt debug system.
- Parameters
-
cb | A function pointer to the callback method or NULL. |
- See also
- DebugCallback