qmetaobject_p.h: don't (incorrectly) fwd-declare QVarLengthArray
authorMarc Mutz <marc.mutz@kdab.com>
Mon, 16 Jul 2012 14:49:51 +0000 (16:49 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 18 Jul 2012 17:53:27 +0000 (19:53 +0200)
qmetaobject_p.h forward-declared QVarLengthArray without the default parameter
for the 'int' template argument. This violates the ODR, so just #include the
header instead. It's not like there's much point in the fwd declaration in
a private header.

Change-Id: Ie5ef1740c57da396c95f5bae1cd81ac941a8ac2d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/corelib/kernel/qmetaobject.cpp
src/corelib/kernel/qmetaobject_p.h

index 3e82de7..589c6a5 100644 (file)
@@ -48,7 +48,6 @@
 #include <qdatastream.h>
 #include <qstringlist.h>
 #include <qthread.h>
-#include <qvarlengtharray.h>
 #include <qvariant.h>
 #include <qhash.h>
 #include <qdebug.h>
index 855a0e0..117412f 100644 (file)
@@ -58,6 +58,7 @@
 #ifndef QT_NO_QOBJECT
 #include <private/qobject_p.h> // For QObjectPrivate::Connection
 #endif
+#include <QtCore/qvarlengtharray.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -159,7 +160,6 @@ private:
     QByteArray _name;
 };
 
-template <class T, int> class QVarLengthArray;
 typedef QVarLengthArray<QArgumentType, 10> QArgumentTypeArray;
 
 class QMetaMethodPrivate;