diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-09-21 13:24:07 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-09-25 13:59:50 +0000 |
commit | ddb191e47a25a8a5c19cb01bec05c9538b22adf7 (patch) | |
tree | 87919d7ef8ddf4c7c81fe7a79b37a09116924eba /examples/network/securesocketclient/main.cpp | |
parent | 7896efdd9f51b7defa02e73303f8aa03cc7f3044 (diff) |
QtNetwork (examples) - update secure socket client example
This patch contains:
- some cosmetic changes to make example look more like
modern C++;
- UI initialization code and SSL signals handling were split
into separate member-functions;
- useless checks 'if (socket)' were deleted;
- widget's minimum size is now fixed + font size
in 'CertInfo' dialog increased to make it readable.
Change-Id: I7aadb78896832a989494d280d6da0635045f948c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'examples/network/securesocketclient/main.cpp')
-rw-r--r-- | examples/network/securesocketclient/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/network/securesocketclient/main.cpp b/examples/network/securesocketclient/main.cpp index e6dc60736f..e9c413577f 100644 --- a/examples/network/securesocketclient/main.cpp +++ b/examples/network/securesocketclient/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -50,6 +50,9 @@ #include <QApplication> #include <QMessageBox> +#include <QtNetwork> + +QT_REQUIRE_CONFIG(ssl); #include "sslclient.h" @@ -61,7 +64,7 @@ int main(int argc, char **argv) if (!QSslSocket::supportsSsl()) { QMessageBox::information(0, "Secure Socket Client", - "This system does not support OpenSSL."); + "This system does not support SSL/TLS."); return -1; } |