diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2009-09-30 12:38:03 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2009-09-30 12:39:36 (GMT) |
commit | 59623e45ee31892c9ef210f8d7e396ccb0fe31a5 (patch) | |
tree | 73ee8b65d4031a52fe68d6047cbe552bdcd2283f /examples | |
parent | 5971b87b4786aeec29a94c4bb77427c9eb823a96 (diff) | |
download | Qt-59623e45ee31892c9ef210f8d7e396ccb0fe31a5.zip Qt-59623e45ee31892c9ef210f8d7e396ccb0fe31a5.tar.gz Qt-59623e45ee31892c9ef210f8d7e396ccb0fe31a5.tar.bz2 |
Google Chat example: state that SSL is required
bail out if SSL is not supported; before it only showed "service
unavailable", which was somewhat confusing.
Reviewed-by: Tor Arne Vestbø
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webkit/googlechat/main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/webkit/googlechat/main.cpp b/examples/webkit/googlechat/main.cpp index fd08114..9e235a9 100644 --- a/examples/webkit/googlechat/main.cpp +++ b/examples/webkit/googlechat/main.cpp @@ -43,10 +43,25 @@ #include <QNetworkProxyFactory> #include "googlechat.h" +#ifndef QT_NO_OPENSSL +#include <QSslSocket> +#endif + int main(int argc, char * argv[]) { QApplication app(argc, argv); +#ifndef QT_NO_OPENSSL + if (!QSslSocket::supportsSsl()) { +#endif + QMessageBox::information(0, "Google Talk client", + "Your system does not support SSL, " + "which is required to run this example."); + return -1; +#ifndef QT_NO_OPENSSL + } +#endif + QNetworkProxyFactory::setUseSystemConfigurationEnabled(true); GoogleChat *chat = new GoogleChat; |