summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp13
-rw-r--r--src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp37
-rw-r--r--src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp3
3 files changed, 34 insertions, 19 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 160b0cb65e..3d619eab82 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -3327,8 +3327,10 @@ void ProjectExplorerPluginPrivate::addNewFile()
map.insert(QLatin1String(Constants::PREFERRED_PROJECT_NODE), QVariant::fromValue(static_cast<void *>(currentNode)));
map.insert(Constants::PREFERRED_PROJECT_NODE_PATH, currentNode->filePath().toString());
if (Project *p = ProjectTree::currentProject()) {
- QList<Id> profileIds = Utils::transform(p->targets(), &Target::id);
- map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), QVariant::fromValue(profileIds));
+ const QStringList profileIds = Utils::transform(p->targets(), [](const Target *t) {
+ return t->id().toString();
+ });
+ map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), profileIds);
map.insert(Constants::PROJECT_POINTER, QVariant::fromValue(static_cast<void *>(p)));
}
ICore::showNewItemDialog(ProjectExplorerPlugin::tr("New File", "Title of dialog"),
@@ -3352,8 +3354,11 @@ void ProjectExplorerPluginPrivate::addNewSubproject()
Project *project = ProjectTree::currentProject();
Core::Id projectType;
if (project) {
- QList<Id> profileIds = Utils::transform(ProjectTree::currentProject()->targets(), &Target::id);
- map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), QVariant::fromValue(profileIds));
+ const QStringList profileIds = Utils::transform(ProjectTree::currentProject()->targets(),
+ [](const Target *t) {
+ return t->id().toString();
+ });
+ map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), profileIds);
projectType = project->id();
}
diff --git a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp
index 9ed1939f1a..9a4b97a0b7 100644
--- a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp
+++ b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp
@@ -140,25 +140,34 @@ bool CustomQmakeProjectWizard::postGenerateFiles(const QWizard *w, const Core::G
}
// ----------------- BaseQmakeProjectWizardDialog
-BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(const Core::BaseFileWizardFactory *factory,
- bool showModulesPage, QWidget *parent,
- const Core::WizardDialogParameters &parameters) :
- ProjectExplorer::BaseProjectWizardDialog(factory, parent, parameters),
- m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
- .value<QList<Core::Id> >())
+BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(
+ const Core::BaseFileWizardFactory *factory,
+ bool showModulesPage,
+ QWidget *parent,
+ const Core::WizardDialogParameters &parameters)
+ : ProjectExplorer::BaseProjectWizardDialog(factory, parent, parameters)
{
+ m_profileIds = Utils::transform(parameters.extraValues()
+ .value(ProjectExplorer::Constants::PROJECT_KIT_IDS)
+ .toStringList(),
+ &Core::Id::fromString);
+
init(showModulesPage);
}
-BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(const Core::BaseFileWizardFactory *factory,
- bool showModulesPage,
- Utils::ProjectIntroPage *introPage,
- int introId, QWidget *parent,
- const Core::WizardDialogParameters &parameters) :
- ProjectExplorer::BaseProjectWizardDialog(factory, introPage, introId, parent, parameters),
- m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
- .value<QList<Core::Id> >())
+BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(
+ const Core::BaseFileWizardFactory *factory,
+ bool showModulesPage,
+ Utils::ProjectIntroPage *introPage,
+ int introId,
+ QWidget *parent,
+ const Core::WizardDialogParameters &parameters)
+ : ProjectExplorer::BaseProjectWizardDialog(factory, introPage, introId, parent, parameters)
{
+ m_profileIds = Utils::transform(parameters.extraValues()
+ .value(ProjectExplorer::Constants::PROJECT_KIT_IDS)
+ .toStringList(),
+ &Core::Id::fromString);
init(showModulesPage);
}
diff --git a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp
index 306a2438a4..7c2f57420a 100644
--- a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp
+++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp
@@ -89,7 +89,8 @@ bool SubdirsProjectWizard::postGenerateFiles(const QWizard *w, const Core::Gener
const QString profileName = Core::BaseFileWizardFactory::buildFileName(projectPath, params.fileName, profileSuffix());
QVariantMap map;
map.insert(QLatin1String(ProjectExplorer::Constants::PREFERRED_PROJECT_NODE), profileName);
- map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS), QVariant::fromValue(wizard->selectedKits()));
+ map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS),
+ Utils::transform<QStringList>(wizard->selectedKits(), &Core::Id::toString));
IWizardFactory::requestNewItemDialog(tr("New Subproject", "Title of dialog"),
Utils::filtered(Core::IWizardFactory::allWizardFactories(),
[](Core::IWizardFactory *f) {