Commit 550a11a8 authored by Tobias Hunger's avatar Tobias Hunger

ProjectExplorer: Fixed "New file" dialog population.

Fixed a regression introduced in d5e7262e.

Task-number: QTCREATORBUG-15696
Change-Id: I97121709f538b5abc8660c2f18bea256db2f26cc
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 6d4abdc8
......@@ -129,7 +129,6 @@
#include <utils/stringutils.h>
#include <QtPlugin>
#include <QDebug>
#include <QFileInfo>
#include <QSettings>
......@@ -3028,7 +3027,9 @@ void ProjectExplorerPluginPrivate::addNewFile()
}
ICore::showNewItemDialog(tr("New File", "Title of dialog"),
Utils::filtered(IWizardFactory::allWizardFactories(),
[](IWizardFactory *f) { return f->supportedPlatforms().isEmpty(); }),
[](IWizardFactory *f) {
return f->supportedProjectTypes().isEmpty();
}),
location, map);
}
......@@ -3054,8 +3055,8 @@ void ProjectExplorerPluginPrivate::addNewSubproject()
ICore::showNewItemDialog(tr("New Subproject", "Title of dialog"),
Utils::filtered(IWizardFactory::allWizardFactories(),
[projectType](IWizardFactory *f) {
return projectType.isValid() ? f->supportedPlatforms().contains(projectType)
: !f->supportedPlatforms().isEmpty(); }),
return projectType.isValid() ? f->supportedProjectTypes().contains(projectType)
: !f->supportedProjectTypes().isEmpty(); }),
location, map);
}
}
......
......@@ -93,7 +93,7 @@ bool SubdirsProjectWizard::postGenerateFiles(const QWizard *w, const Core::Gener
IWizardFactory::requestNewItemDialog(tr("New Subproject", "Title of dialog"),
Utils::filtered(Core::IWizardFactory::allWizardFactories(),
[](Core::IWizardFactory *f) {
return f->supportedPlatforms().contains(Constants::QMAKEPROJECT_ID);
return f->supportedProjectTypes().contains(Constants::QMAKEPROJECT_ID);
}),
wizard->parameters().projectPath(), map);
} else {
......
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