Switch to compile time connect syntax

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-12-01 15:34:00 -08:00
parent c0ac953242
commit 3f72500f87

View file

@ -32,9 +32,9 @@ bool CheckCloudConnection::checkServer()
request.setUrl(QString(prefs.cloud_base_url) + TEAPOT);
QNetworkAccessManager *mgr = new QNetworkAccessManager();
reply = mgr->get(request);
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
connect(reply, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrors(QList<QSslError>)));
connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
connect(reply, &QNetworkReply::sslErrors, this, &CheckCloudConnection::sslErrors);
timer.start(5000); // wait five seconds
loop.exec();
if (timer.isActive()) {