Commit 78f1b24c authored by Tobias Hunger's avatar Tobias Hunger

JsonKitsPage: Clarify unexpanded/expanded project path

Change-Id: I62a04582d29b122f6210b3bcef0d3e5e26d5286e
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent d295b304
......@@ -60,12 +60,10 @@ void JsonKitsPage::initializePage()
const QString platform = wiz->value(QLatin1String("Platform")).toString();
const Core::FeatureSet preferred = Core::FeatureSet::fromStringList(wiz->value(QLatin1String("PreferredFeatures")).toStringList());
const Core::FeatureSet required = Core::FeatureSet::fromStringList(wiz->value(QLatin1String("RequiredFeatures")).toStringList());
const QString path = wiz->expander()->expand(m_projectFilePath);
setProjectPath(path);
setRequiredKitMatcher(KitMatcher([required](const Kit *k) { return k->hasFeatures(required); }));
setPreferredKitMatcher(KitMatcher([platform, preferred](const Kit *k) { return k->hasPlatform(platform) && k->hasFeatures(preferred); }));
setProjectPath(wiz->expander()->expand(unexpandedProjectPath()));
TargetSetupPage::initializePage();
}
......
......@@ -44,16 +44,17 @@ class JsonKitsPage : public TargetSetupPage
public:
JsonKitsPage(QWidget *parent = 0);
void setProjectFilePath(const QString &path) { m_projectFilePath = path; }
void initializePage();
void cleanupPage();
void setUnexpandedProjectPath(const QString &path);
QString unexpandedProjectPath() const;
private slots:
void setupProjectFiles(const JsonWizard::GeneratorFiles &files);
private:
QString m_projectFilePath;
QString m_unexpandedProjectPath;
};
} // namespace ProjectExplorer
......
......@@ -139,7 +139,7 @@ Utils::WizardPage *KitsPageFactory::create(JsonWizard *wizard, Core::Id typeId,
QTC_ASSERT(canCreate(typeId), return 0);
JsonKitsPage *page = new JsonKitsPage;
page->setProjectFilePath(data.toMap().value(QLatin1String("projectFilePath")).toString());
page->setUnexpandedProjectPath(data.toMap().value(QLatin1String("projectFilePath")).toString());
return page;
}
......
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