Fixed "No such signal" error in download example output.
authorMitch Curtis <mitch.curtis@nokia.com>
Fri, 18 May 2012 13:42:00 +0000 (15:42 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 22 May 2012 08:27:46 +0000 (10:27 +0200)
The signal sslErrors is not defined by QNetworkReply when QT_NO_SSL
is undefined. The solution was to add the an ifndef guard around the
call to connect so that the signal is only used when it is defined.

Change-Id: I9f104ec630ed448af65669b0861df233de5172ac
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
examples/network/download/main.cpp

index ae3aa1f..40ea9a9 100644 (file)
@@ -86,7 +86,10 @@ void DownloadManager::doDownload(const QUrl &url)
 {
     QNetworkRequest request(url);
     QNetworkReply *reply = manager.get(request);
+
+#ifndef QT_NO_SSL
     connect(reply, SIGNAL(sslErrors(QList<QSslError>)), SLOT(sslErrors(QList<QSslError>)));
+#endif
 
     currentDownloads.append(reply);
 }