summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-24 03:51:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-24 03:51:55 (GMT)
commit295fbcba490712fe6e6f61926836920366134b55 (patch)
tree0df8076c4d49efccb62d03c7d1b7a1ebf15fe409 /examples
parentf5812ae1b669daa921eeabc903ec0eafcfe0c030 (diff)
parentbd4b9fc3dd1e4f89cee4bb3e7921bf50f28eb9d9 (diff)
downloadQt-295fbcba490712fe6e6f61926836920366134b55.zip
Qt-295fbcba490712fe6e6f61926836920366134b55.tar.gz
Qt-295fbcba490712fe6e6f61926836920366134b55.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (48 commits) Remove the use of the QtTest baseline feature I reverted Revert "Add a feature to QTestLib to correct benchmark results." Use the ARM version of UTF-8 detection in the Neon code Update the data files for the QString benchmark test Fix a bug in the SSE2 UTF-8 decoder. Add ARM Neon versions of fromLatin1 and fromUtf8 Make this compile on Atom/Core2 (no SSE4) and on ARM (no SSE) Add baselines and zeros to the benchmarks. Add an UTF-8 conversion on trusted data and no BOM. Make it easier to write a UTF-8 conversion on trusted data Add the missing tests and 4-byte UTF-8 sequences Improve the code and avoid unnecessary stores Add an UTF-8 conversion optimised for ASCII using SSE2 Add an UTF-8 conversion code that is optimised for ASCII Add a stateless copy of the Qt 4.7 UTF-8 codec. Add UTF-8 code benchmarks Improve a little more the core loop and propagate to the other code Reduce the number of operations in the main loop Add an SSE4 version using PMOVZXBW and PSRLDQ Attempt to improve the epilog code ...
Diffstat (limited to 'examples')
-rw-r--r--examples/network/download/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp
index 5980ecd..1b7e54b 100644
--- a/examples/network/download/main.cpp
+++ b/examples/network/download/main.cpp
@@ -45,12 +45,19 @@
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
+#include <QSslError>
#include <QStringList>
#include <QTimer>
#include <QUrl>
#include <stdio.h>
+QT_BEGIN_NAMESPACE
+class QSslError;
+QT_END_NAMESPACE
+
+QT_USE_NAMESPACE
+
class DownloadManager: public QObject
{
Q_OBJECT
@@ -66,6 +73,7 @@ public:
public slots:
void execute();
void downloadFinished(QNetworkReply *reply);
+ void sslErrors(const QList<QSslError> &errors);
};
DownloadManager::DownloadManager()
@@ -78,6 +86,7 @@ void DownloadManager::doDownload(const QUrl &url)
{
QNetworkRequest request(url);
QNetworkReply *reply = manager.get(request);
+ connect(reply, SIGNAL(sslErrors(QList<QSslError>)), SLOT(sslErrors(QList<QSslError>)));
currentDownloads.append(reply);
}
@@ -140,6 +149,14 @@ void DownloadManager::execute()
}
}
+void DownloadManager::sslErrors(const QList<QSslError> &sslErrors)
+{
+#ifndef QT_NO_OPENSSL
+ foreach (const QSslError &error, sslErrors)
+ fprintf(stderr, "SSL error: %s\n", qPrintable(error.errorString()));
+#endif
+}
+
void DownloadManager::downloadFinished(QNetworkReply *reply)
{
QUrl url = reply->url();