Fix compilation of websocketprotocol test.
authorMilian Wolff <mail@milianw.de>
Thu, 6 Feb 2014 13:46:30 +0000 (14:46 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 6 Feb 2014 19:17:02 +0000 (20:17 +0100)
The versionFromString method must be exported for usage in the test.
Additionally, the metatype of the version enum must be declared.

Change-Id: I8e0aef28f9902f274cab43f772667ad5a93c4062
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
src/websockets/qwebsocketprotocol_p.h
tests/auto/websocketprotocol/tst_websocketprotocol.cpp

index 8850c4d..93ba7b9 100644 (file)
@@ -87,7 +87,7 @@ inline bool isCloseCodeValid(int closeCode)
 }
 
 inline Version currentVersion() { return VersionLatest; }
-Version versionFromString(const QString &versionString);
+Version Q_AUTOTEST_EXPORT versionFromString(const QString &versionString);
 
 void Q_AUTOTEST_EXPORT mask(QByteArray *payload, quint32 maskingKey);
 void Q_AUTOTEST_EXPORT mask(char *payload, quint64 size, quint32 maskingKey);
index b8948d5..5fae50f 100644 (file)
@@ -51,6 +51,7 @@ QT_USE_NAMESPACE
 
 Q_DECLARE_METATYPE(QWebSocketProtocol::CloseCode)
 Q_DECLARE_METATYPE(QWebSocketProtocol::OpCode)
+Q_DECLARE_METATYPE(QWebSocketProtocol::Version)
 
 class tst_WebSocketProtocol : public QObject
 {