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

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