Qt Extended Home · Index · Classes · Headers · Overviews codeless banner

<qtopiadesktoplog.h> - <qtopiadesktoplog.h>

The <qtopiadesktoplog.h> header contains the category definitions used in Qt Extended Sync Agent. More...

Functions

Macros

The <qtopiadesktoplog.h> header contains the category definitions used in Qt Extended Sync Agent.

    QD_LOG_OPTION(QDA)       // This is reserved for QtopiaDesktopApplication
    QD_LOG_OPTION(PM)        // Plugin Manager logging
    QD_LOG_OPTION(I18N)      // I18n-related stuff
    QD_LOG_OPTION(UI)        // General UI-related stuff
    QD_LOG_OPTION(UI_tray)   // System Tray

    // "Generic" plugin LOG (by class)
    QD_LOG_OPTION(QDApp)
    QD_LOG_OPTION(QDLink)
    QD_LOG_OPTION(QDCon)
    QD_LOG_OPTION(QDDev)
    QD_LOG_OPTION(QDSync)

See also <qlog.h>.


Function Documentation

bool qtopiadesktopLogEnabled ( const char * category )

This function returns true if category has been enabled.

    Q_GLOBAL_STATIC_WITH_ARGS(DesktopSettings, logSettings, ("Log"));
    Q_GLOBAL_STATIC(QList<char*>, logCache);

    void qtopiadesktopLogSemiVolatile(char *mem)
    {
        QList<char*> &list(*logCache());
        if (!list.contains(mem))
            list.append(mem);
    }

    bool qtopiadesktopLogEnabled( const char *_category )
    {
        if (_category == 0) {
            logSettings()->sync();
            foreach (char *mem, *logCache())
                (*mem) = 0;
            return false;

Macro Documentation

QDLOG_OPTION ( CATEGORY )

Register a category for conditional logging. This enables qLog(CATEGORY) but the log messages are not displayed unless CATEGORY is enabled. This macro uses the qtopiadesktopLogEnabled() function to check if CATEGORY is enabled.


Copyright © 2009 Trolltech
Qt Extended Sync Agent Documentation