Add typeinfo for the declarative plugin for Qt Multimedia

For Qt Creator to correctly typecheck and auto-complete QML types and
objects, the typeinfo must be exported and added to the qmldir file.
This patch contains those changes, and an update to make updating the
typeinfo file easier in the future.

Change-Id: I988f22d3ca81839662cce4aed9d5297f7c5fbf32
Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
Jonas Rabbe
2012-04-04 08:30:28 +10:00
committed by Qt by Nokia
parent df3f5d790f
commit 7c57a7c412
3 changed files with 1366 additions and 1 deletions

View File

@@ -55,7 +55,29 @@ OTHER_FILES += \
Video_4.qml \
Video.qml
qmldir.files += $$PWD/qmldir $$PWD/Video.qml $$PWD/Video_4.qml
# plugin.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs
# to be regenerated whenever the QML elements exported by the plugin change. This cannot be done
# automatically at compile time because qmlplugindump does not support some QML features and it may
# not be possible when cross-compiling.
#
# To regenerate run 'make qmltypes' which will update the plugins.qmltypes file in the source
# directory. Then review and commit the changes made to plugins.qmltypes.
#
# This will run the following command:
# qmlplugindump <import name> <import version> <path to import plugin> > plugins.qmltypes
# e.g.:
# qmlplugindump QtMultimedia 5.0 imports/QtMultimedia/libdeclarative_multimedia.so > plugins.qmltypes
load(resolve_target)
qmltypes.target = qmltypes
qmltypes.commands = $$[QT_INSTALL_BINS]/qmlplugindump QtMultimedia 5.0 $$QMAKE_RESOLVED_TARGET > $$PWD/plugins.qmltypes
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
QMAKE_EXTRA_TARGETS += qmltypes
# Tell qmake to create such makefile that qmldir, plugins.qmltypes and target
# (i.e. declarative_multimedia) are all copied to $$[QT_INSTALL_IMPORTS]/QtMultimedia directory,
qmldir.files += $$PWD/qmldir $$PWD/plugins.qmltypes $$PWD/Video.qml $$PWD/Video_4.qml
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
# another copy of the qmldir file so the old import works

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
plugin declarative_multimedia
typeinfo plugins.qmltypes
Video 5.0 Video.qml
Video 4.0 Video_4.qml