diff options
author | Daniel Pesch <dpesch@blackberry.com> | 2014-01-20 16:40:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 17:21:02 +0100 |
commit | 4c5cd2f04fdaf946cc67896db7c190a318811d86 (patch) | |
tree | 0a2d12876a57af78bed444c3c366401e554bc845 /tools/qmlplugindump/qmlstreamwriter.cpp | |
parent | 19025ab3422658ab27415cee99336d88a4ae19fa (diff) |
qmlplugindump: New component properties isCreatable and isSingleton
Qmlplugindump tool does not generate information about singleton status
and creatability from QML for a component. This patch adds two new boolean
properties that contain this information. It is used by Momentics IDE for
providing better code validation and could be used by QtCreator in future
in similar way.
Task-number: QTBUG-36139
Change-Id: If85374a1854aaa0727670b27df735d481cab5337
Signed-off-by: Daniel Pesch <dpesch@blackberry.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'tools/qmlplugindump/qmlstreamwriter.cpp')
-rw-r--r-- | tools/qmlplugindump/qmlstreamwriter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/qmlplugindump/qmlstreamwriter.cpp b/tools/qmlplugindump/qmlstreamwriter.cpp index 629e30b814..44bdcfea74 100644 --- a/tools/qmlplugindump/qmlstreamwriter.cpp +++ b/tools/qmlplugindump/qmlstreamwriter.cpp @@ -183,6 +183,16 @@ void QmlStreamWriter::writePotentialLine(const QByteArray &line) } } +void QmlStreamWriter::writeIsCreatable(bool isCreatable) { + writeIndent(); + m_stream->write(QString("isCreatable: %1\n").arg(isCreatable ? "true" : "false").toUtf8()); +} + +void QmlStreamWriter::writeIsSingleton(bool isSingleton) { + writeIndent(); + m_stream->write(QString("isSingleton: %1\n").arg(isSingleton ? "true" : "false").toUtf8()); +} + void QmlStreamWriter::flushPotentialLinesWithNewlines() { if (m_maybeOneline) |