diff options
author | kh1 <karsten.heimrich@digia.com> | 2012-10-25 17:48:57 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2012-10-29 08:55:38 +0100 |
commit | 84c839be72671cfcc4e0babe62f1321fa6472151 (patch) | |
tree | 3af0ce478c82fdef2945938886cf3e9d421fe616 | |
parent | 389ce988b1f3d83b6c1b2924f8f9e34ab5c37f10 (diff) |
Inline. Fixes the missing read from the server side (debug).
Change-Id: Ifdefd483873fb77836c3566a0930432ad836f53b
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
-rw-r--r-- | src/libs/installer/fsengineclient.cpp | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/src/libs/installer/fsengineclient.cpp b/src/libs/installer/fsengineclient.cpp index 7e3ceb1d5..bc885214f 100644 --- a/src/libs/installer/fsengineclient.cpp +++ b/src/libs/installer/fsengineclient.cpp @@ -119,8 +119,32 @@ public: qint64 write(const char *data, qint64 len); private: - template<typename T> T returnWithType() const; - template<typename T> T returnWithCastedType() const; + // these should be inline, since debugging on VS2010 fails without it (not sure about the reason) + template<typename T> inline T returnWithType() const + { + socket->flush(); + if (!socket->bytesAvailable()) + socket->waitForReadyRead(); + quint32 test; + stream >> test; + + T result; + stream >> result; + return result; + } + + template<typename T> inline T returnWithCastedType() const + { + socket->flush(); + if (!socket->bytesAvailable()) + socket->waitForReadyRead(); + quint32 test; + stream >> test; + + int result; + stream >> result; + return static_cast<T>(result); + } private: friend class FSEngineClientHandler; @@ -129,32 +153,6 @@ private: mutable QDataStream stream; }; -template<typename T> T FSEngineClient::returnWithType() const -{ - socket->flush(); - if (!socket->bytesAvailable()) - socket->waitForReadyRead(); - quint32 test; - stream >> test; - - T result; - stream >> result; - return result; -} - -template<typename T> T FSEngineClient::returnWithCastedType() const -{ - socket->flush(); - if (!socket->bytesAvailable()) - socket->waitForReadyRead(); - quint32 test; - stream >> test; - - int result; - stream >> result; - return static_cast<T>(result); -} - /*! \internal */ |