Home · Modules · All Classes · All Namespaces
Typedefs | Functions
Common debug support

Typedefs

typedef void(* Tp::DebugCallback) (const QString &libraryName, const QString &libraryVersion, QtMsgType type, const QString &msg)
 

Functions

void Tp::enableDebug (bool enable)
 
void Tp::enableWarnings (bool enable)
 
void Tp::setDebugCallback (DebugCallback cb)
 

Detailed Description

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.

Typedef Documentation

◆ DebugCallback

Tp::DebugCallback
typedef QDebug (*DebugCallback)(const QString &libraryName,
const QString &libraryVersion,
QtMsgType type,
const QString &msg)

Function Documentation

◆ 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
enableWhether 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
enableWhether warnings should be enabled or not.

◆ setDebugCallback()

void Tp::setDebugCallback ( DebugCallback  cb)

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
cbA function pointer to the callback method or NULL.
See also
DebugCallback