From 59623e45ee31892c9ef210f8d7e396ccb0fe31a5 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 30 Sep 2009 14:38:03 +0200 Subject: Google Chat example: state that SSL is required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bail out if SSL is not supported; before it only showed "service unavailable", which was somewhat confusing. Reviewed-by: Tor Arne Vestbø --- examples/webkit/googlechat/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'examples/webkit') diff --git a/examples/webkit/googlechat/main.cpp b/examples/webkit/googlechat/main.cpp index fd0811452e..9e235a946f 100644 --- a/examples/webkit/googlechat/main.cpp +++ b/examples/webkit/googlechat/main.cpp @@ -43,10 +43,25 @@ #include #include "googlechat.h" +#ifndef QT_NO_OPENSSL +#include +#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; -- cgit v1.2.3