diff options
| author | JBB <jbb.prv@gmx.de> | 2020-01-20 00:19:38 +0100 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2020-01-20 00:19:38 +0100 |
| commit | 8557bc3a605e5d2b1a7dae5999501b19c1c99b58 (patch) | |
| tree | f17fefa61a26e01c99884c7d3e458b8ea70b181b /src/base/QXmppLogger.cpp | |
| parent | cccb7675e0eb9d411c736d1ff3f189fb75ef33dd (diff) | |
| download | qxmpp-8557bc3a605e5d2b1a7dae5999501b19c1c99b58.tar.gz | |
Port majority of old-style connects (#237)
This provides more type safety and is future-proof.
Diffstat (limited to 'src/base/QXmppLogger.cpp')
| -rw-r--r-- | src/base/QXmppLogger.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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 |
