Commit bfcdc28a authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Kai Koehne

QtQuickAppWizard: adding missing wizard

Adding Qt Quick 2 Application (from Existing QML File) wizard.

Task-number: QTCREATORBUG-8755
Change-Id: I3f5bdac5356ec31a4f6c1cd8e2a21f61982b04ee
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 362671cb
......@@ -76,7 +76,7 @@ QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent,
setWindowTitle(tr("New Qt Quick Application"));
setIntroDescription(tr("This wizard generates a Qt Quick application project."));
if (kind == QtQuickAppWizard::ImportQml) { //Choose existing qml file
if (kind == QtQuickAppWizard::ImportQml || kind == QtQuickAppWizard::ImportQml2) { //Choose existing qml file
m_componentOptionsPage = new Internal::QtQuickComponentSetOptionsPage;
m_componentOptionsPageId = addPageWithTitle(m_componentOptionsPage, tr("Select existing QML file"));
m_componentItem = wizardProgress()->item(m_componentOptionsPageId);
......@@ -84,7 +84,7 @@ QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent,
AbstractMobileAppWizardDialog::addMobilePages();
if (kind == QtQuickAppWizard::ImportQml) {
if (kind == QtQuickAppWizard::ImportQml || kind == QtQuickAppWizard::ImportQml2) {
if (targetsPageItem())
m_componentItem->setNextItems(QList<Utils::WizardProgressItem *>()
<< targetsPageItem());
......@@ -179,9 +179,19 @@ void QtQuickAppWizard::createInstances(ExtensionSystem::IPlugin *plugin)
parameter.setRequiredFeatures(basicFeatures);
list << parameter;
parameter = base;
parameter.setDisplayName(tr("Qt Quick 2 Application (from Existing QML File)"));
parameter.setDescription(basicDescription + tr("Creates a deployable Qt Quick application from "
"existing QML files. All files and directories that "
"reside in the same directory as the main .qml file "
"are deployed. You can modify the contents of the "
"directory any time before deploying.\n\nRequires <b>Qt 5.0</b> or newer."));
parameter.setRequiredFeatures(Core::Feature(QtSupport::Constants::FEATURE_QT_QUICK_2));
list << parameter;
QList<QtQuickAppWizard*> wizardList = Core::createMultipleBaseFileWizardInstances<QtQuickAppWizard>(list, plugin);
Q_ASSERT(wizardList.count() == 4);
Q_ASSERT(wizardList.count() == 5);
for (int i = 0; i < wizardList.count(); i++) {
wizardList.at(i)->setQtQuickKind(Kind(i));
......@@ -217,6 +227,10 @@ AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWid
d->app->setComponentSet(QtQuickApp::QtQuick10Components);
d->app->setMainQml(QtQuickApp::ModeImport);
break;
case ImportQml2:
d->app->setComponentSet(QtQuickApp::QtQuick20Components);
d->app->setMainQml(QtQuickApp::ModeImport);
break;
case QtQuick2_0:
d->app->setComponentSet(QtQuickApp::QtQuick20Components);
d->app->setMainQml(QtQuickApp::ModeGenerate);
......
......@@ -44,7 +44,8 @@ public:
QtQuick1_1 = 0,
QtQuick2_0 = 1,
MeegoComponents = 2,
ImportQml = 3
ImportQml = 3,
ImportQml2 = 4
};
QtQuickAppWizard();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment