-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0 Alpha
-
None
-
a5c85e3250a10a8e23ce15f9a6811136f6bb23fd
There is such code here:
enum SslMode {
#ifndef QT_NO_SSL
SecureMode,
#endif
NonSecureMode
};
It means, that the value of NonSecureMode enumerator depends on QT_NO_SSL. If Qt is built with QT_NO_SSL defined, NonSecureMode is equal to 0, otherwise it is equal to 1.
It causes the annoying collision. Lets we have the following code in our program:
QWebSocketServer *server = new QWebSocketServer("TestServer", QWebSocketServer::NonSecureMode);
If we build it with Qt, built with QT_NO_SSL defined, the value of SslMode in out server is equal to 0. If we run this program with such Qt, it works ok.
But if we try to execute the same program with Qt, built without QT_NO_SSL defined (i.e. where SecureMode is equal to 0), the server "thinks", that it is run in secure mode. As a result such server tries to work with QSslSocket instead of QTcpSocket as we want.
SUGGESTION
I think one should make the following definition of SslMode enumeration:
enum SslMode {
SecureMode,
NonSecureMode
};
It gets rid the described collision.