Clean up qcontainerfwd.h

Add missing declaration of QVariantList and friends. Replace
class with typename for template parameters.

Remove some left-over forward declarations in other headers.

Change-Id: I31d443019d48b619e02834395dafa40182cac7b9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Lars Knoll 2020-10-25 14:20:59 +01:00
parent 7d75a48507
commit 089fc2df1b
6 changed files with 17 additions and 33 deletions

View File

@ -1305,16 +1305,6 @@ QT_FOR_EACH_STATIC_WIDGETS_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER)
#undef QT_FORWARD_DECLARE_STATIC_TYPES_ITER
typedef QList<QVariant> QVariantList;
typedef QMap<QString, QVariant> QVariantMap;
typedef QHash<QString, QVariant> QVariantHash;
typedef QPair<QVariant, QVariant> QVariantPair;
#ifdef Q_CLANG_QDOC
class QByteArrayList;
#else
using QByteArrayList = QList<QByteArray>;
#endif
#define Q_DECLARE_METATYPE_TEMPLATE_1ARG(SINGLE_ARG_TEMPLATE) \
QT_BEGIN_NAMESPACE \
template <typename T> \

View File

@ -47,10 +47,6 @@
QT_BEGIN_NAMESPACE
template <class Key, class T> class QMap;
typedef QMap<QString, QVariant> QVariantMap;
template <class Key, class T> class QHash;
typedef QHash<QString, QVariant> QVariantHash;
class QJsonObject;
class QDataStream;

View File

@ -49,10 +49,6 @@
QT_BEGIN_NAMESPACE
class QDebug;
template <class Key, class T> class QMap;
typedef QMap<QString, QVariant> QVariantMap;
template <class Key, class T> class QHash;
typedef QHash<QString, QVariant> QVariantHash;
class QCborContainerPrivate;

View File

@ -48,18 +48,18 @@
QT_BEGIN_NAMESPACE
template <class Key, class T> class QCache;
template <class Key, class T> class QHash;
template <class Key, class T> class QMap;
template <class Key, class T> class QMultiHash;
template <class Key, class T> class QMultiMap;
template <typename Key, typename T> class QCache;
template <typename Key, typename T> class QHash;
template <typename Key, typename T> class QMap;
template <typename Key, typename T> class QMultiHash;
template <typename Key, typename T> class QMultiMap;
template <typename T1, typename T2>
using QPair = std::pair<T1, T2>;
template <class T> class QQueue;
template <class T> class QSet;
template <class T> class QStack;
template<class T, qsizetype Prealloc = 256> class QVarLengthArray;
template <class T> class QList;
template <typename T> class QQueue;
template <typename T> class QSet;
template <typename T> class QStack;
template <typename T, qsizetype Prealloc = 256> class QVarLengthArray;
template <typename T> class QList;
#ifndef Q_CLANG_QDOC
template<typename T> using QVector = QList<T>;
using QStringList = QList<QString>;
@ -72,6 +72,11 @@ class QByteArrayList;
class QMetaType;
class QVariant;
using QVariantList = QList<QVariant>;
using QVariantMap = QMap<QString, QVariant>;
using QVariantHash = QHash<QString, QVariant>;
using QVariantPair = QPair<QVariant, QVariant>;
QT_END_NAMESPACE
#endif // QCONTAINERFWD_H

View File

@ -691,7 +691,7 @@ struct iterator {
} // namespace QHashPrivate
template <class Key, class T>
template <typename Key, typename T>
class QHash
{
using Node = QHashPrivate::Node<Key, T>;
@ -1136,7 +1136,7 @@ public:
template <class Key, class T>
template <typename Key, typename T>
class QMultiHash
{
using Node = QHashPrivate::MultiNode<Key, T>;

View File

@ -101,10 +101,7 @@ typedef QT_PREPEND_NAMESPACE(quintptr) WId;
QT_BEGIN_NAMESPACE
template<class K, class V> class QHash;
typedef QHash<WId, QWidget *> QWidgetMapper;
template<class V> class QSet;
typedef QSet<QWidget *> QWidgetSet;
QT_END_NAMESPACE