![]() |
Qt Extended Home · Index · Classes · Headers · Overviews | ![]() |
The <qtopiadesktoplog.h> header contains the category definitions used in Qt Extended Sync Agent. More...
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>.
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;
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 |