aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppLogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/QXmppLogger.cpp')
-rw-r--r--src/base/QXmppLogger.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/base/QXmppLogger.cpp b/src/base/QXmppLogger.cpp
index 34ff2f2f..4b3ec625 100644
--- a/src/base/QXmppLogger.cpp
+++ b/src/base/QXmppLogger.cpp
@@ -62,12 +62,12 @@ static QString formatted(QXmppLogger::MessageType type, const QString& text)
static void relaySignals(QXmppLoggable *from, QXmppLoggable *to)
{
- QObject::connect(from, SIGNAL(incrementCounter(QString)),
- 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)));
+ QObject::connect(from, SIGNAL(updateCounter(QString,qint64)),
+ to, SIGNAL(updateCounter(QString,qint64)));
}
/// Constructs a new QXmppLoggable.
@@ -93,12 +93,12 @@ void QXmppLoggable::childEvent(QChildEvent *event)
if (event->added()) {
relaySignals(child, this);
} else if (event->removed()) {
- disconnect(child, SIGNAL(incrementCounter(QString)),
- 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)));
+ disconnect(child, SIGNAL(updateCounter(QString,qint64)),
+ this, SIGNAL(updateCounter(QString,qint64)));
}
}
/// \endcond
@@ -192,15 +192,6 @@ void QXmppLogger::setMessageTypes(QXmppLogger::MessageTypes types)
d->messageTypes = types;
}
-/// Increments the given \a counter.
-///
-/// NOTE: the base implementation does nothing.
-
-void QXmppLogger::incrementCounter(const QString &counter)
-{
- Q_UNUSED(counter);
-}
-
/// Add a logging message.
///
/// \param type
@@ -242,6 +233,16 @@ void QXmppLogger::setGauge(const QString &gauge, double value)
Q_UNUSED(value);
}
+/// Updates the given \a counter by \a amount.
+///
+/// NOTE: the base implementation does nothing.
+
+void QXmppLogger::updateCounter(const QString &counter, qint64 amount)
+{
+ Q_UNUSED(counter);
+ Q_UNUSED(amount);
+}
+
/// Returns the path to which logging messages should be written.
///
/// \sa loggingType()