diff --git a/share/qtcreator/templates/wizards/qml-extension/project.pro b/share/qtcreator/templates/wizards/qml-extension/project.pro index 94686cebcaba3f8feb3124f56dfe33d170deec74..1e98bd7a7657db0371d26040805881551a0d7251 100644 --- a/share/qtcreator/templates/wizards/qml-extension/project.pro +++ b/share/qtcreator/templates/wizards/qml-extension/project.pro @@ -4,6 +4,7 @@ QT += declarative CONFIG += qt plugin TARGET = $$qtLibraryTarget($$TARGET) +uri = %Uri% # Input SOURCES += \ @@ -23,3 +24,13 @@ OTHER_FILES = qmldir QMAKE_EXTRA_TARGETS += copy_qmldir PRE_TARGETDEPS += $$copy_qmldir.target } + +qmldir.files = qmldir +symbian { + # ... +} else:unix { + installPath = /usr/lib/qt4/imports/$$replace(uri, \., /) + qmldir.path = $$installPath + target.path = $$installPath + INSTALLS += target qmldir +} diff --git a/share/qtcreator/templates/wizards/qml-extension/wizard.xml b/share/qtcreator/templates/wizards/qml-extension/wizard.xml index d5239ec5842a5daab36075af455fe2f1d97bee7c..307b2fdc49b1a65482aa29248108bda62fbf8a97 100644 --- a/share/qtcreator/templates/wizards/qml-extension/wizard.xml +++ b/share/qtcreator/templates/wizards/qml-extension/wizard.xml @@ -60,6 +60,10 @@ leave room for the Qt 4 target page. <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9_]+$' defaulttext="MyItem"/> <fielddescription>Object Class-name:</fielddescription> </field> + <field mandatory="false" name="Uri"> + <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9]+([A-Za-z0-9-]*[A-Za-z0-9]+)?(\.[A-Za-z0-9]+([-A-Za-z0-9]*[A-Za-z0-9]+)?)*$' defaulttext="com.mycompany.qmlcomponents"/> + <fielddescription>URI:</fielddescription> + </field> </fields> <validationrules> <validationrule condition='"%ObjectName%" != "%ProjectName%_plugin"'>