From 79b742b7e01ba5fa46b45578660d0e1f9ce0dae6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 20 Jul 2012 10:56:54 +0200 Subject: QtNetwork: use nullary version of qRegisterMetaType("T") Using the nullary version has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType("T") will happily register anything. So I've added the macro where it was missing, or moved it to a central place when it existed hidden. In tst_qnetworkreply, this became a bit tricky, because a private header is conditionally included, so moved the Q_DECLARE_METATYPE() into a conditional section, too. Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727 Reviewed-by: Stephen Kelly --- tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests/auto/network/ssl') diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 22ce512cf9..725dc2a653 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -63,15 +63,12 @@ #include "../../../network-settings.h" -Q_DECLARE_METATYPE(QAbstractSocket::SocketState) -Q_DECLARE_METATYPE(QAbstractSocket::SocketError) #ifndef QT_NO_SSL Q_DECLARE_METATYPE(QSslSocket::SslMode) typedef QList SslErrorList; Q_DECLARE_METATYPE(SslErrorList) Q_DECLARE_METATYPE(QSslError) Q_DECLARE_METATYPE(QSsl::SslProtocol) -Q_DECLARE_METATYPE(QSslConfiguration) #endif #if defined Q_OS_HPUX && defined Q_CC_GNU -- cgit v1.2.3