[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/qca
From: Ivan Romanov <drizt () land ! ru>
Date: 2013-04-06 6:52:54
Message-ID: 20130406065254.DABF2AC879 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1348086 by iromanov:
[qca] porting to Qt5
http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html
The QObject::connectNotify() and QObject::disconnectNotify() functions now need a \
QMetaMethod argument that identifies the signal, rather than a const char pointer.
M +8 -0 include/QtCrypto/qca_securelayer.h
M +29 -0 src/qca_securelayer.cpp
--- trunk/kdesupport/qca/include/QtCrypto/qca_securelayer.h #1348085:1348086
@@ -783,7 +783,11 @@
\param signal the name of the signal that has been
connected to.
*/
+#if QT_VERSION >= 0x050000
+ void connectNotify(const QMetaMethod &signal);
+#else
void connectNotify(const char *signal);
+#endif
/**
Called when a connection is removed from a particular signal
@@ -791,7 +795,11 @@
\param signal the name of the signal that has been
disconnected from.
*/
+#if QT_VERSION >= 0x050000
+ void disconnectNotify(const QMetaMethod &signal);
+#else
void disconnectNotify(const char *signal);
+#endif
private:
Q_DISABLE_COPY(TLS)
--- trunk/kdesupport/qca/src/qca_securelayer.cpp #1348085:1348086
@@ -25,6 +25,9 @@
#include "qca_safeobj.h"
#include <QPointer>
+#if QT_VERSION >= 0x050000
+#include <QMetaMethod>
+#endif
namespace QCA {
@@ -1173,6 +1176,31 @@
d->c->setMTU(size);
}
+#if QT_VERSION >= 0x050000
+void TLS::connectNotify(const QMetaMethod &signal)
+{
+ if(signal == QMetaMethod::fromSignal(&TLS::hostNameReceived))
+ d->connect_hostNameReceived = true;
+ else if(signal == QMetaMethod::fromSignal(&TLS::certificateRequested))
+ d->connect_certificateRequested = true;
+ else if(signal == QMetaMethod::fromSignal(&TLS::peerCertificateAvailable))
+ d->connect_peerCertificateAvailable = true;
+ else if(signal == QMetaMethod::fromSignal(&TLS::handshaken))
+ d->connect_handshaken = true;
+}
+
+void TLS::disconnectNotify(const QMetaMethod &signal)
+{
+ if(signal == QMetaMethod::fromSignal(&TLS::hostNameReceived))
+ d->connect_hostNameReceived = false;
+ else if(signal == QMetaMethod::fromSignal(&TLS::certificateRequested))
+ d->connect_certificateRequested = false;
+ else if(signal == QMetaMethod::fromSignal(&TLS::peerCertificateAvailable))
+ d->connect_peerCertificateAvailable = false;
+ else if(signal == QMetaMethod::fromSignal(&TLS::handshaken))
+ d->connect_handshaken = false;
+}
+#else
void TLS::connectNotify(const char *signal)
{
if(signal == QMetaObject::normalizedSignature(SIGNAL(hostNameReceived())))
@@ -1196,6 +1224,7 @@
else if(signal == QMetaObject::normalizedSignature(SIGNAL(handshaken())))
d->connect_handshaken = false;
}
+#endif
//----------------------------------------------------------------------------
// SASL::Params
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic