aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppLogger.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-09-10 14:58:49 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-09-10 14:58:49 +0200
commitca58ee37157f4ae9635ccdf3ab662c31ba0e6904 (patch)
treefe4201a74d7f445c1a8cdd0c1ac4a69343094646 /src/base/QXmppLogger.cpp
parent858c95cd64794ae78bf3f39805b933c6289bd84d (diff)
downloadqxmpp-ca58ee37157f4ae9635ccdf3ab662c31ba0e6904.tar.gz
add counters
Diffstat (limited to 'src/base/QXmppLogger.cpp')
-rw-r--r--src/base/QXmppLogger.cpp14
1 files changed, 14 insertions, 0 deletions
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()