summaryrefslogtreecommitdiffstats
path: root/tools/repc/cppcodegenerator.cpp
diff options
context:
space:
mode:
authorBrett Stottlemyer <bstottle@ford.com>2020-06-30 08:21:55 -0400
committerBrett Stottlemyer <bstottle@ford.com>2020-07-21 16:52:10 -0400
commit18c5833856795ecb5aaa5e0c8ba26dcdd74e1d65 (patch)
treef4ba4fbfc7bed4548191b3c54a35f95054f1ae68 /tools/repc/cppcodegenerator.cpp
parent497768da4cecd6bfb3a02f7a325303722733769d (diff)
[Repc] Remove moc_copy in favor of json input
The json input needs to be generated by moc with --output-json option. This also copies the qmake required pri/prf files to qtbase, and updates them so qmake works with --output-json as well. Change-Id: I172794f0c7c85f6e8fcd03654eecd3776f49e521 Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'tools/repc/cppcodegenerator.cpp')
-rw-r--r--tools/repc/cppcodegenerator.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/repc/cppcodegenerator.cpp b/tools/repc/cppcodegenerator.cpp
index df9c478..236c7f1 100644
--- a/tools/repc/cppcodegenerator.cpp
+++ b/tools/repc/cppcodegenerator.cpp
@@ -26,8 +26,10 @@
**
****************************************************************************/
+#include <qjsonarray.h>
+#include <qjsonvalue.h>
+
#include "cppcodegenerator.h"
-#include "moc.h"
#include "utils.h"
QT_BEGIN_NAMESPACE
@@ -38,9 +40,9 @@ CppCodeGenerator::CppCodeGenerator(QIODevice *outputDevice)
Q_ASSERT(m_outputDevice);
}
-void CppCodeGenerator::generate(const QVector<ClassDef> &classList, bool alwaysGenerateClass /* = false */)
+void CppCodeGenerator::generate(const QJsonArray &classList, bool alwaysGenerateClass /* = false */)
{
- for (const ClassDef &cdef : classList)
+ for (const QJsonValue &cdef : classList)
m_outputDevice->write(generateClass(cdef, alwaysGenerateClass));
m_outputDevice->write("\n");