summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-09-09 10:08:24 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-12 23:36:04 +0200
commite07a739138251a21f000e6f42c0cefa22b32c0c0 (patch)
tree9b9aeec66ccafec95c6398f1c005e87fe29fe127
parent557623cc4f22295e5e89462dfdff20d78b3b9cdc (diff)
Fix generated forward declarations in qdbusxml.cpp
Simply use qcontainerfwd.h, instead of declaring those manually. Change-Id: I6d87bf14b60469b457e8e9335868f8cdb0303817 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/tools/qcontainerfwd.h4
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/tools/qcontainerfwd.h b/src/corelib/tools/qcontainerfwd.h
index 4aec3574ff..069be4ef10 100644
--- a/src/corelib/tools/qcontainerfwd.h
+++ b/src/corelib/tools/qcontainerfwd.h
@@ -61,6 +61,10 @@ template <class T> class QStack;
template<class T, qsizetype Prealloc = 256> class QVarLengthArray;
template <class T> class QList;
template<typename T> using QVector = QList<T>;
+class QStringList;
+using QByteArrayList = QList<QByteArray>;
+class QMetaType;
+class QVariant;
QT_END_NAMESPACE
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index 48a0d91adb..96928f4da3 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -71,13 +71,7 @@ static const char includeList[] =
"#include <QtCore/QVariant>\n";
static const char forwardDeclarations[] =
- "QT_BEGIN_NAMESPACE\n"
- "#include <QtCore/qcontainerfwd.h>\n"
- "class QByteArray;\n"
- "class QString;\n"
- "class QStringList;\n"
- "class QVariant;\n"
- "QT_END_NAMESPACE\n";
+ "#include <QtCore/qcontainerfwd.h>\n";
static QDBusIntrospection::Interfaces readInput()
{