path: root/src
diff options
authorOlivier Goffart <>2011-11-10 11:50:02 +0100
committerQt by Nokia <>2011-11-10 13:33:02 +0100
commite6abf810468c50cb621804e0232aa7e73366abfd (patch)
tree16b06a12ec790b30eddf66bf908396ae40f92b47 /src
parentbcd16f9453e543ba819385d87bd7061a4caeb325 (diff)
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 <>
Diffstat (limited to 'src')
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 7dacc837a3..717e72c810 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -45,10 +45,6 @@
#include <QtCore/qglobal.h>
#include <QtCore/qatomic.h>
-#include <QtCore/qdatastream.h>
#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 {
enum Type {