From ca58ee37157f4ae9635ccdf3ab662c31ba0e6904 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 10 Sep 2012 14:58:49 +0200 Subject: add counters --- src/base/QXmppLogger.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/base/QXmppLogger.cpp') diff --git a/src/base/QXmppLogger.cpp b/src/base/QXmppLogger.cpp index 2bce8690..34ff2f2f 100644 --- a/src/base/QXmppLogger.cpp +++ b/src/base/QXmppLogger.cpp @@ -66,6 +66,8 @@ static void relaySignals(QXmppLoggable *from, QXmppLoggable *to) to, SIGNAL(incrementCounter(QString))); QObject::connect(from, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), to, SIGNAL(logMessage(QXmppLogger::MessageType,QString))); + QObject::connect(from, SIGNAL(setGauge(QString,double)), + to, SIGNAL(setGauge(QString,double))); } /// Constructs a new QXmppLoggable. @@ -95,6 +97,8 @@ void QXmppLoggable::childEvent(QChildEvent *event) this, SIGNAL(incrementCounter(QString))); disconnect(child, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), this, SIGNAL(logMessage(QXmppLogger::MessageType,QString))); + disconnect(child, SIGNAL(setGauge(QString,double)), + this, SIGNAL(setGauge(QString,double))); } } /// \endcond @@ -228,6 +232,16 @@ void QXmppLogger::log(QXmppLogger::MessageType type, const QString& text) } } +/// Sets the given \a gauge to \a value. +/// +/// NOTE: the base implementation does nothing. + +void QXmppLogger::setGauge(const QString &gauge, double value) +{ + Q_UNUSED(gauge); + Q_UNUSED(value); +} + /// Returns the path to which logging messages should be written. /// /// \sa loggingType() -- cgit v1.2.3