diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-09-30 10:23:16 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-09-30 10:56:23 (GMT) |
commit | bbdb460ef1778298908ae677684e5855c25d0ce5 (patch) | |
tree | 9981a70da7e558af07bdfa0dceafecadbed66985 /examples/webkit/googlechat | |
parent | 5170432e7cb2d0d1adf7ac2ec1ece627c75470f3 (diff) | |
download | Qt-bbdb460ef1778298908ae677684e5855c25d0ce5.zip Qt-bbdb460ef1778298908ae677684e5855c25d0ce5.tar.gz Qt-bbdb460ef1778298908ae677684e5855c25d0ce5.tar.bz2 |
Fix googlechat example when Qt is lacking SSL support.
Don't build the googlechat example if QSslSocket isn't available.
And even then also perform a run-time check and display an error page
if SSL is not available.
This is because the login into Google Chat works through an https website.
Reviewed-by: Jesper
Diffstat (limited to 'examples/webkit/googlechat')
-rw-r--r-- | examples/webkit/googlechat/googlechat.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/webkit/googlechat/googlechat.cpp b/examples/webkit/googlechat/googlechat.cpp index a4a19a4..af567d1 100644 --- a/examples/webkit/googlechat/googlechat.cpp +++ b/examples/webkit/googlechat/googlechat.cpp @@ -41,6 +41,7 @@ #include <QtGui> #include <QtWebKit> +#include <QSslSocket> #include "googlechat.h" @@ -118,6 +119,11 @@ void GoogleChat::doLogin() { void GoogleChat::initialPage(bool ok) { if (ok) { + if (!QSslSocket::supportsSsl()) { + showError("This example requires SSL support."); + return; + } + QString s1 = evalJS("document.getElementById('Email').name"); QString s2 = evalJS("document.getElementById('Passwd').name"); QString s3 = evalJS("document.getElementById('gaia_loginform').id"); |