Removed include to qdatastream.h from qmetatype.h

Added forward reference to QDataStream instead

In the new connection syntax, I want to include qmetatype.h from qobject.h,
in order to handle metatype for queued connection.
So qdatastream cannot be included here (as it inherit qobject) else it would
lead to circular inclusion.

QDataStream is only used in templated code that is dependent on the
template parametter so it is fine to have it forward declared.

Change-Id: I08ea479f481262a80451a277ee29533c42cb9f89
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
bb10
Olivier Goffart 2011-11-10 11:50:02 +01:00 committed by Qt by Nokia
parent bcd16f9453
commit e6abf81046
1 changed files with 2 additions and 4 deletions

View File

@ -45,10 +45,6 @@
#include <QtCore/qglobal.h>
#include <QtCore/qatomic.h>
#ifndef QT_NO_DATASTREAM
#include <QtCore/qdatastream.h>
#endif
#include <new>
#ifdef Bool
@ -178,6 +174,8 @@ QT_MODULE(Core)
#define QT_DEFINE_METATYPE_ID(TypeName, Id, Name) \
TypeName = Id,
class QDataStream;
class Q_CORE_EXPORT QMetaType {
public:
enum Type {