Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 75dd755c authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 5b8a515e
......@@ -44,15 +44,15 @@ Job::Private::Private(Job *parent):
void Job::Private::init()
{
QTimer::singleShot(0, q, SLOT(_k_doStart()));
QTimer::singleShot(0, q, [this]() { _k_doStart(); });
accessManager = new KIO::Integration::AccessManager(q);
connect(accessManager, SIGNAL(finished(QNetworkReply*)),
q, SLOT(_k_replyReceived(QNetworkReply*)));
dispatchTimer = new QTimer(q);
connect(dispatchTimer, SIGNAL(timeout()),
q, SLOT(_k_dispatchTimeout()));
connect(dispatchTimer, &QTimer::timeout,
q, [this]() { _k_dispatchTimeout(); });
}
QString Job::Private::parseErrorMessage(const QByteArray &json)
......@@ -371,7 +371,7 @@ void Job::restart()
return;
}
QTimer::singleShot(0, this, SLOT(_k_doStart()));
QTimer::singleShot(0, this, [this]() { d->_k_doStart();});
}
void Job::emitFinished()
......
......@@ -328,11 +328,8 @@ class KGAPICORE_EXPORT Job : public QObject
friend class AuthJob;
Q_PRIVATE_SLOT(d, void _k_doStart())
Q_PRIVATE_SLOT(d, void _k_doEmitFinished())
Q_PRIVATE_SLOT(d, void _k_replyReceived(QNetworkReply *reply))
Q_PRIVATE_SLOT(d, void _k_dispatchTimeout())
};
} // namespace KGAPI2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment