From 8557bc3a605e5d2b1a7dae5999501b19c1c99b58 Mon Sep 17 00:00:00 2001 From: JBB Date: Mon, 20 Jan 2020 00:19:38 +0100 Subject: Port majority of old-style connects (#237) This provides more type safety and is future-proof. --- src/base/QXmppLogger.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/base/QXmppLogger.cpp') diff --git a/src/base/QXmppLogger.cpp b/src/base/QXmppLogger.cpp index 0580627d..10ee3471 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(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))); + QObject::connect(from, &QXmppLoggable::logMessage, + to, &QXmppLoggable::logMessage); + QObject::connect(from, &QXmppLoggable::setGauge, + to, &QXmppLoggable::setGauge); + QObject::connect(from, &QXmppLoggable::updateCounter, + to, &QXmppLoggable::updateCounter); } /// 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(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))); + disconnect(child, &QXmppLoggable::logMessage, + this, &QXmppLoggable::logMessage); + disconnect(child, &QXmppLoggable::setGauge, + this, &QXmppLoggable::setGauge); + disconnect(child, &QXmppLoggable::updateCounter, + this, &QXmppLoggable::updateCounter); } } /// \endcond -- cgit v1.2.3