1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-25 23:06:23 +02:00

Update qxt to latest upstream git revision

Now we are using plain qxt again as all needed local modifications are
merged upstream.
This commit is contained in:
Uwe L. Korn
2014-08-10 12:00:25 +01:00
parent 4a20e6f5f9
commit c86b629c4a
3 changed files with 39 additions and 16 deletions

View File

@@ -65,6 +65,7 @@ public:
QSslCertificate localCertificate;
QSslKey privateKey;
bool autoEncrypt;
QSsl::SslProtocol proto;
QQueue<QSslSocket*> pendingConnections;
};
@@ -75,6 +76,7 @@ QxtSslServer::QxtSslServer(QObject* parent) : QTcpServer(parent)
{
QXT_INIT_PRIVATE(QxtSslServer);
qxt_d().autoEncrypt = true;
qxt_d().proto = QSsl::TlsV1SslV3;
}
/*!
@@ -194,16 +196,34 @@ bool QxtSslServer::autoEncrypt() const
return qxt_d().autoEncrypt;
}
/*!
* Sets the protocol used when \a autoEncrypt is enabled.
*
* \sa protocol
*/
void QxtSslServer::setProtocol(QSsl::SslProtocol proto)
{
qxt_d().proto = proto;
}
/*!
* Returns the protocol used when \a autoEncrypt is enabled.
* \sa setProtocol
*/
QSsl::SslProtocol QxtSslServer::protocol() const
{
return qxt_d().proto;
}
/*!
* \reimp
*/
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
#if QT_VERSION >= 0x050000
void QxtSslServer::incomingConnection(qintptr socketDescriptor)
#else
void QxtSslServer::incomingConnection(int socketDescriptor)
#endif
{
qWarning() << Q_FUNC_INFO << socketDescriptor;
QSslSocket* socket = new QSslSocket(this);
if(socket->setSocketDescriptor(socketDescriptor)) {
socket->setLocalCertificate(qxt_d().localCertificate);

View File

@@ -60,9 +60,12 @@ public:
void setAutoEncrypt(bool on);
bool autoEncrypt() const;
void setProtocol(QSsl::SslProtocol proto);
QSsl::SslProtocol protocol() const;
protected:
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
virtual void incomingConnection(qintptr socketDescriptor);
#if QT_VERSION >= 0x050000
virtual void incomingConnection(qintptr socketDescriptor);
#else
virtual void incomingConnection(int socketDescriptor);
#endif