forked from qt-creator/qt-creator
JsonWizard: Make description on projects page default to the wizard description
Change-Id: Icb8a4856dda4298b3ee901bc7a5c22190ddca5a6 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -24,8 +24,7 @@
|
|||||||
{
|
{
|
||||||
"trDisplayName": "Project Location",
|
"trDisplayName": "Project Location",
|
||||||
"trShortTitle": "Location",
|
"trShortTitle": "Location",
|
||||||
"typeId": "Project",
|
"typeId": "Project"
|
||||||
"data": { "trDescription": "This wizard creates an empty .pro file." }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
|
|||||||
@@ -23,8 +23,7 @@
|
|||||||
{
|
{
|
||||||
"trDisplayName": "Project Location",
|
"trDisplayName": "Project Location",
|
||||||
"trShortTitle": "Location",
|
"trShortTitle": "Location",
|
||||||
"typeId": "Project",
|
"typeId": "Project"
|
||||||
"data": { "trDescription": "Creates a deployable Qt Quick 2 application." }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trDisplayName": "Define Project Details",
|
"trDisplayName": "Define Project Details",
|
||||||
|
|||||||
@@ -25,8 +25,7 @@
|
|||||||
{
|
{
|
||||||
"trDisplayName": "Project Location",
|
"trDisplayName": "Project Location",
|
||||||
"trShortTitle": "Location",
|
"trShortTitle": "Location",
|
||||||
"typeId": "Project",
|
"typeId": "Project"
|
||||||
"data": { "trDescription": "Creates a deployable Qt Quick 2 application using Qt Quick Controls." }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trDisplayName": "Define Project Details",
|
"trDisplayName": "Define Project Details",
|
||||||
|
|||||||
@@ -23,8 +23,7 @@
|
|||||||
{
|
{
|
||||||
"trDisplayName": "Project Location",
|
"trDisplayName": "Project Location",
|
||||||
"trShortTitle": "Location",
|
"trShortTitle": "Location",
|
||||||
"typeId": "Project",
|
"typeId": "Project"
|
||||||
"data": { "trDescription": "Creates a Qt Quick UI project." }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trDisplayName": "Define Project Details",
|
"trDisplayName": "Define Project Details",
|
||||||
|
|||||||
@@ -25,8 +25,7 @@
|
|||||||
{
|
{
|
||||||
"trDisplayName": "Project Location",
|
"trDisplayName": "Project Location",
|
||||||
"trShortTitle": "Location",
|
"trShortTitle": "Location",
|
||||||
"typeId": "Project",
|
"typeId": "Project"
|
||||||
"data": { "trDescription": "Creates a Qt Quick UI project using Qt Quick Controls." }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trDisplayName": "Define Project Details",
|
"trDisplayName": "Define Project Details",
|
||||||
|
|||||||
@@ -388,6 +388,12 @@ void JsonWizardFactory::runWizard(const QString &path, QWidget *parent, const QS
|
|||||||
kindStr = QLatin1String(Core::Constants::WIZARD_KIND_PROJECT);
|
kindStr = QLatin1String(Core::Constants::WIZARD_KIND_PROJECT);
|
||||||
wizard.setValue(QStringLiteral("kind"), kindStr);
|
wizard.setValue(QStringLiteral("kind"), kindStr);
|
||||||
|
|
||||||
|
wizard.setValue(QStringLiteral("trDescription"), description());
|
||||||
|
wizard.setValue(QStringLiteral("trDisplayName"), displayName());
|
||||||
|
wizard.setValue(QStringLiteral("trCategory"), displayCategory());
|
||||||
|
wizard.setValue(QStringLiteral("category"), category());
|
||||||
|
wizard.setValue(QStringLiteral("id"), id().toString());
|
||||||
|
|
||||||
for (auto i = m_options.constBegin(); i != m_options.constEnd(); ++i)
|
for (auto i = m_options.constBegin(); i != m_options.constEnd(); ++i)
|
||||||
wizard.setValue(i.key(), i.value());
|
wizard.setValue(i.key(), i.value());
|
||||||
|
|
||||||
|
|||||||
@@ -182,8 +182,9 @@ Utils::WizardPage *ProjectPageFactory::create(JsonWizard *wizard, Core::Id typeI
|
|||||||
JsonProjectPage *page = new JsonProjectPage;
|
JsonProjectPage *page = new JsonProjectPage;
|
||||||
|
|
||||||
QVariantMap tmp = data.isNull() ? QVariantMap() : data.toMap();
|
QVariantMap tmp = data.isNull() ? QVariantMap() : data.toMap();
|
||||||
QString description = tmp.value(QLatin1String("trDescription")).toString();
|
QString description
|
||||||
page->setDescription(description);
|
= tmp.value(QLatin1String("trDescription"), QLatin1String("%{trDescription}")).toString();
|
||||||
|
page->setDescription(wizard->expander()->expand(description));
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user