summaryrefslogtreecommitdiffstats
path: root/examples/webkit
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2009-09-30 14:38:03 +0200
committerPeter Hartmann <peter.hartmann@nokia.com>2009-09-30 14:39:36 +0200
commit59623e45ee31892c9ef210f8d7e396ccb0fe31a5 (patch)
tree73ee8b65d4031a52fe68d6047cbe552bdcd2283f /examples/webkit
parent5971b87b4786aeec29a94c4bb77427c9eb823a96 (diff)
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/webkit')
-rw-r--r--examples/webkit/googlechat/main.cpp15
1 files changed, 15 insertions, 0 deletions
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 <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;