2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2015-01-14 18:07:15 +01:00
|
|
|
** Copyright (C) 2015 The Qt Company Ltd.
|
|
|
|
|
** Contact: http://www.qt.io/licensing
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2015-01-14 18:07:15 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms and
|
|
|
|
|
** conditions see http://www.qt.io/terms-conditions. For further information
|
2014-10-01 13:21:18 +02:00
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2012-10-02 09:12:39 +02:00
|
|
|
**
|
2015-01-14 18:07:15 +01:00
|
|
|
** In addition, as a special exception, The Qt Company gives you certain additional
|
|
|
|
|
** rights. These rights are described in The Qt Company LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "qtwizard.h"
|
2010-02-17 14:26:42 +01:00
|
|
|
|
2009-11-26 18:03:16 +01:00
|
|
|
#include "modulespage.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-10-29 16:19:24 +01:00
|
|
|
#include <qmakeprojectmanager/qmakeproject.h>
|
|
|
|
|
#include <qmakeprojectmanager/qmakeprojectmanager.h>
|
|
|
|
|
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
|
2013-08-29 16:36:42 +02:00
|
|
|
|
2009-01-20 11:52:04 +01:00
|
|
|
#include <coreplugin/icore.h>
|
2011-02-28 16:50:14 +01:00
|
|
|
|
2009-06-17 12:40:54 +02:00
|
|
|
#include <cpptools/cpptoolsconstants.h>
|
2011-02-28 16:50:14 +01:00
|
|
|
|
2014-07-23 09:09:20 +02:00
|
|
|
#include <projectexplorer/kitinformation.h>
|
2010-03-17 17:45:33 +01:00
|
|
|
#include <projectexplorer/projectexplorer.h>
|
2014-02-07 22:39:44 +01:00
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2013-08-13 10:52:57 +02:00
|
|
|
#include <projectexplorer/targetsetuppage.h>
|
2012-09-03 18:31:44 +02:00
|
|
|
#include <qtsupport/qtkitinformation.h>
|
2012-04-24 15:49:09 +02:00
|
|
|
#include <qtsupport/qtsupportconstants.h>
|
2011-02-28 16:50:14 +01:00
|
|
|
|
|
|
|
|
#include <extensionsystem/pluginmanager.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QCoreApplication>
|
|
|
|
|
#include <QVariant>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-09-10 17:59:34 +02:00
|
|
|
using namespace ProjectExplorer;
|
2013-10-16 11:02:37 +02:00
|
|
|
using namespace QmakeProjectManager;
|
|
|
|
|
using namespace QmakeProjectManager::Internal;
|
2014-07-23 09:09:20 +02:00
|
|
|
using namespace QtSupport;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
// -------------------- QtWizard
|
2013-09-20 15:12:44 +02:00
|
|
|
QtWizard::QtWizard()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2014-05-02 17:38:42 +02:00
|
|
|
setWizardKind(Core::IWizardFactory::ProjectWizard);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-12-16 14:19:34 +01:00
|
|
|
QString QtWizard::sourceSuffix()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2014-02-07 22:39:44 +01:00
|
|
|
return preferredSuffix(QLatin1String(ProjectExplorer::Constants::CPP_SOURCE_MIMETYPE));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-12-16 14:19:34 +01:00
|
|
|
QString QtWizard::headerSuffix()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2014-02-07 22:39:44 +01:00
|
|
|
return preferredSuffix(QLatin1String(ProjectExplorer::Constants::CPP_HEADER_MIMETYPE));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-12-16 14:19:34 +01:00
|
|
|
QString QtWizard::formSuffix()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2014-02-07 22:39:44 +01:00
|
|
|
return preferredSuffix(QLatin1String(ProjectExplorer::Constants::FORM_MIMETYPE));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-12-16 14:19:34 +01:00
|
|
|
QString QtWizard::profileSuffix()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
return preferredSuffix(QLatin1String(Constants::PROFILE_MIMETYPE));
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-29 17:25:40 +02:00
|
|
|
bool QtWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage) const
|
2010-03-12 11:20:32 +01:00
|
|
|
{
|
|
|
|
|
return QtWizard::qt4ProjectPostGenerateFiles(w, l, errorMessage);
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-16 15:55:32 +02:00
|
|
|
bool QtWizard::qt4ProjectPostGenerateFiles(const QWizard *w,
|
|
|
|
|
const Core::GeneratedFiles &generatedFiles,
|
|
|
|
|
QString *errorMessage)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2013-10-29 17:24:09 +01:00
|
|
|
const BaseQmakeProjectWizardDialog *dialog = qobject_cast<const BaseQmakeProjectWizardDialog *>(w);
|
2010-02-17 16:18:21 +01:00
|
|
|
|
2010-04-16 15:55:32 +02:00
|
|
|
// Generate user settings
|
|
|
|
|
foreach (const Core::GeneratedFile &file, generatedFiles)
|
|
|
|
|
if (file.attributes() & Core::GeneratedFile::OpenProjectAttribute) {
|
|
|
|
|
dialog->writeUserFile(file.path());
|
|
|
|
|
break;
|
|
|
|
|
}
|
2010-02-17 16:18:21 +01:00
|
|
|
|
2010-04-16 15:55:32 +02:00
|
|
|
// Post-Generate: Open the projects/editors
|
|
|
|
|
return ProjectExplorer::CustomProjectWizard::postGenerateOpen(generatedFiles ,errorMessage);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-12-16 14:19:34 +01:00
|
|
|
QString QtWizard::templateDir()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2012-01-24 15:36:40 +01:00
|
|
|
QString rc = Core::ICore::resourcePath();
|
2008-12-02 12:01:29 +01:00
|
|
|
rc += QLatin1String("/templates/qt4project");
|
|
|
|
|
return rc;
|
|
|
|
|
}
|
2009-06-17 12:40:54 +02:00
|
|
|
|
|
|
|
|
bool QtWizard::lowerCaseFiles()
|
|
|
|
|
{
|
|
|
|
|
QString lowerCaseSettingsKey = QLatin1String(CppTools::Constants::CPPTOOLS_SETTINGSGROUP);
|
|
|
|
|
lowerCaseSettingsKey += QLatin1Char('/');
|
|
|
|
|
lowerCaseSettingsKey += QLatin1String(CppTools::Constants::LOWERCASE_CPPFILES_KEY);
|
|
|
|
|
const bool lowerCaseDefault = CppTools::Constants::lowerCaseFilesDefault;
|
2012-01-24 15:36:40 +01:00
|
|
|
return Core::ICore::settings()->value(lowerCaseSettingsKey, QVariant(lowerCaseDefault)).toBool();
|
2009-06-17 12:40:54 +02:00
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
// ------------ CustomQmakeProjectWizard
|
|
|
|
|
CustomQmakeProjectWizard::CustomQmakeProjectWizard()
|
2010-03-12 11:20:32 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-27 13:18:05 +02:00
|
|
|
Core::BaseFileWizard *CustomQmakeProjectWizard::create(QWidget *parent,
|
2014-05-27 12:23:38 +02:00
|
|
|
const Core::WizardDialogParameters ¶meters) const
|
2010-03-12 11:20:32 +01:00
|
|
|
{
|
2015-05-29 17:25:40 +02:00
|
|
|
BaseQmakeProjectWizardDialog *wizard = new BaseQmakeProjectWizardDialog(this, false, parent,
|
|
|
|
|
parameters);
|
2012-02-03 18:00:08 +01:00
|
|
|
|
2014-05-27 12:23:38 +02:00
|
|
|
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
|
2013-11-04 13:56:41 +01:00
|
|
|
wizard->addTargetSetupPage(targetPageId);
|
2012-07-04 15:57:54 +02:00
|
|
|
|
2015-05-29 17:25:40 +02:00
|
|
|
initProjectWizardDialog(wizard, parameters.defaultPath(), wizard->extensionPages());
|
2010-03-12 11:20:32 +01:00
|
|
|
return wizard;
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-29 17:25:40 +02:00
|
|
|
bool CustomQmakeProjectWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l,
|
|
|
|
|
QString *errorMessage) const
|
2010-03-12 11:20:32 +01:00
|
|
|
{
|
|
|
|
|
return QtWizard::qt4ProjectPostGenerateFiles(w, l, errorMessage);
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
// ----------------- BaseQmakeProjectWizardDialog
|
2015-05-29 17:25:40 +02:00
|
|
|
BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(const Core::BaseFileWizardFactory *factory,
|
|
|
|
|
bool showModulesPage, QWidget *parent,
|
|
|
|
|
const Core::WizardDialogParameters ¶meters) :
|
|
|
|
|
ProjectExplorer::BaseProjectWizardDialog(factory, parent, parameters),
|
2010-02-17 16:18:21 +01:00
|
|
|
m_modulesPage(0),
|
2012-05-14 18:55:30 +02:00
|
|
|
m_targetSetupPage(0),
|
2012-11-26 15:09:56 +02:00
|
|
|
m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
|
|
|
|
|
.value<QList<Core::Id> >())
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
|
|
|
|
init(showModulesPage);
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-29 17:25:40 +02:00
|
|
|
BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(const Core::BaseFileWizardFactory *factory,
|
|
|
|
|
bool showModulesPage,
|
|
|
|
|
Utils::ProjectIntroPage *introPage,
|
|
|
|
|
int introId, QWidget *parent,
|
|
|
|
|
const Core::WizardDialogParameters ¶meters) :
|
|
|
|
|
ProjectExplorer::BaseProjectWizardDialog(factory, introPage, introId, parent, parameters),
|
2010-02-17 16:18:21 +01:00
|
|
|
m_modulesPage(0),
|
2012-05-14 18:55:30 +02:00
|
|
|
m_targetSetupPage(0),
|
2012-11-26 15:09:56 +02:00
|
|
|
m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
|
|
|
|
|
.value<QList<Core::Id> >())
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
|
|
|
|
init(showModulesPage);
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
BaseQmakeProjectWizardDialog::~BaseQmakeProjectWizardDialog()
|
2010-03-05 12:12:21 +01:00
|
|
|
{
|
2010-03-29 17:57:18 +02:00
|
|
|
if (m_targetSetupPage && !m_targetSetupPage->parent())
|
|
|
|
|
delete m_targetSetupPage;
|
2010-03-05 12:12:21 +01:00
|
|
|
if (m_modulesPage && !m_modulesPage->parent())
|
|
|
|
|
delete m_modulesPage;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
void BaseQmakeProjectWizardDialog::init(bool showModulesPage)
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
|
|
|
|
if (showModulesPage)
|
|
|
|
|
m_modulesPage = new ModulesPage;
|
2015-09-22 16:06:20 +02:00
|
|
|
connect(this, &BaseProjectWizardDialog::projectParametersChanged,
|
|
|
|
|
this, &BaseQmakeProjectWizardDialog::generateProfileName);
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
2009-06-17 12:40:54 +02:00
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
int BaseQmakeProjectWizardDialog::addModulesPage(int id)
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
2010-03-05 11:24:31 +01:00
|
|
|
if (!m_modulesPage)
|
|
|
|
|
return -1;
|
|
|
|
|
if (id >= 0) {
|
|
|
|
|
setPage(id, m_modulesPage);
|
|
|
|
|
return id;
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
2010-03-31 14:48:08 +02:00
|
|
|
const int newId = addPage(m_modulesPage);
|
|
|
|
|
return newId;
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
|
|
|
|
|
2013-11-04 13:56:41 +01:00
|
|
|
int BaseQmakeProjectWizardDialog::addTargetSetupPage(int id)
|
2010-02-17 16:18:21 +01:00
|
|
|
{
|
2013-08-13 10:52:57 +02:00
|
|
|
m_targetSetupPage = new ProjectExplorer::TargetSetupPage;
|
2012-04-24 15:49:09 +02:00
|
|
|
const QString platform = selectedPlatform();
|
2013-11-04 13:56:41 +01:00
|
|
|
Core::FeatureSet features = Core::FeatureSet(QtSupport::Constants::FEATURE_DESKTOP);
|
2012-04-24 15:49:09 +02:00
|
|
|
if (platform.isEmpty())
|
2014-07-23 09:09:20 +02:00
|
|
|
m_targetSetupPage->setPreferredKitMatcher(QtKitInformation::qtVersionMatcher(features));
|
2012-04-24 15:49:09 +02:00
|
|
|
else
|
2014-07-23 09:09:20 +02:00
|
|
|
m_targetSetupPage->setPreferredKitMatcher(QtKitInformation::platformMatcher(platform));
|
2010-08-18 11:25:23 +02:00
|
|
|
|
2014-07-23 09:09:20 +02:00
|
|
|
m_targetSetupPage->setRequiredKitMatcher(QtKitInformation::qtVersionMatcher(requiredFeatures()));
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
resize(900, 450);
|
2010-03-29 17:57:18 +02:00
|
|
|
if (id >= 0)
|
|
|
|
|
setPage(id, m_targetSetupPage);
|
|
|
|
|
else
|
|
|
|
|
id = addPage(m_targetSetupPage);
|
|
|
|
|
|
|
|
|
|
return id;
|
2010-02-17 16:18:21 +01:00
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
QStringList BaseQmakeProjectWizardDialog::selectedModulesList() const
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
2012-02-10 12:29:53 +01:00
|
|
|
return m_modulesPage ? m_modulesPage->selectedModulesList() : m_selectedModules;
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
2009-06-17 12:40:54 +02:00
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
void BaseQmakeProjectWizardDialog::setSelectedModules(const QString &modules, bool lock)
|
2010-01-29 22:49:55 +01:00
|
|
|
{
|
2012-02-10 12:29:53 +01:00
|
|
|
const QStringList modulesList = modules.split(QLatin1Char(' '));
|
2009-11-26 18:03:16 +01:00
|
|
|
if (m_modulesPage) {
|
2012-02-10 12:29:53 +01:00
|
|
|
foreach (const QString &module, modulesList) {
|
2009-11-26 18:03:16 +01:00
|
|
|
m_modulesPage->setModuleSelected(module, true);
|
|
|
|
|
m_modulesPage->setModuleEnabled(module, !lock);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2012-02-10 12:29:53 +01:00
|
|
|
m_selectedModules = modulesList;
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
|
|
|
|
}
|
2009-06-17 12:40:54 +02:00
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
QStringList BaseQmakeProjectWizardDialog::deselectedModulesList() const
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
2012-02-10 12:29:53 +01:00
|
|
|
return m_modulesPage ? m_modulesPage->deselectedModulesList() : m_deselectedModules;
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
2009-06-17 12:40:54 +02:00
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
void BaseQmakeProjectWizardDialog::setDeselectedModules(const QString &modules)
|
2009-11-26 18:03:16 +01:00
|
|
|
{
|
2012-02-10 12:29:53 +01:00
|
|
|
const QStringList modulesList = modules.split(QLatin1Char(' '));
|
2009-11-26 18:03:16 +01:00
|
|
|
if (m_modulesPage) {
|
2012-02-10 12:29:53 +01:00
|
|
|
foreach (const QString &module, modulesList)
|
2009-11-26 18:03:16 +01:00
|
|
|
m_modulesPage->setModuleSelected(module, false);
|
|
|
|
|
} else {
|
2012-02-10 12:29:53 +01:00
|
|
|
m_deselectedModules = modulesList;
|
2009-11-26 18:03:16 +01:00
|
|
|
}
|
|
|
|
|
}
|
2009-06-17 12:40:54 +02:00
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
bool BaseQmakeProjectWizardDialog::writeUserFile(const QString &proFileName) const
|
2010-03-29 17:57:18 +02:00
|
|
|
{
|
|
|
|
|
if (!m_targetSetupPage)
|
|
|
|
|
return false;
|
|
|
|
|
|
2013-10-29 15:15:10 +01:00
|
|
|
QmakeManager *manager = ExtensionSystem::PluginManager::getObject<QmakeManager>();
|
2010-03-29 17:57:18 +02:00
|
|
|
Q_ASSERT(manager);
|
|
|
|
|
|
2013-10-29 14:22:31 +01:00
|
|
|
QmakeProject *pro = new QmakeProject(manager, proFileName);
|
2010-03-29 17:57:18 +02:00
|
|
|
bool success = m_targetSetupPage->setupProject(pro);
|
|
|
|
|
if (success)
|
|
|
|
|
pro->saveSettings();
|
|
|
|
|
delete pro;
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
bool BaseQmakeProjectWizardDialog::setupProject(QmakeProject *project) const
|
2010-02-17 16:18:21 +01:00
|
|
|
{
|
2012-05-14 18:55:30 +02:00
|
|
|
if (!m_targetSetupPage)
|
|
|
|
|
return true;
|
2010-03-29 17:57:18 +02:00
|
|
|
return m_targetSetupPage->setupProject(project);
|
2010-02-17 16:18:21 +01:00
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
bool BaseQmakeProjectWizardDialog::isQtPlatformSelected(const QString &platform) const
|
2010-02-17 16:18:21 +01:00
|
|
|
{
|
2012-09-03 18:31:44 +02:00
|
|
|
QList<Core::Id> selectedKitList = selectedKits();
|
2012-05-14 18:55:30 +02:00
|
|
|
|
2014-07-23 09:09:20 +02:00
|
|
|
foreach (Kit *k, KitManager::matchingKits(QtKitInformation::platformMatcher(platform)))
|
2012-09-09 20:41:30 +03:00
|
|
|
if (selectedKitList.contains(k->id()))
|
2012-05-14 18:55:30 +02:00
|
|
|
return true;
|
2013-09-10 17:59:34 +02:00
|
|
|
|
2012-05-14 18:55:30 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
QList<Core::Id> BaseQmakeProjectWizardDialog::selectedKits() const
|
2012-05-14 18:55:30 +02:00
|
|
|
{
|
|
|
|
|
if (!m_targetSetupPage)
|
|
|
|
|
return m_profileIds;
|
2012-09-03 18:31:44 +02:00
|
|
|
return m_targetSetupPage->selectedKits();
|
2010-02-17 16:18:21 +01:00
|
|
|
}
|
2010-03-05 11:24:31 +01:00
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
void BaseQmakeProjectWizardDialog::addExtensionPages(const QList<QWizardPage *> &wizardPageList)
|
2012-02-14 15:21:21 +01:00
|
|
|
{
|
|
|
|
|
foreach (QWizardPage *p,wizardPageList)
|
2014-05-30 11:38:08 +02:00
|
|
|
addPage(p);
|
2012-02-14 15:21:21 +01:00
|
|
|
}
|
|
|
|
|
|
2013-10-29 17:24:09 +01:00
|
|
|
void BaseQmakeProjectWizardDialog::generateProfileName(const QString &name, const QString &path)
|
2010-04-19 16:11:21 +02:00
|
|
|
{
|
2012-05-14 18:55:30 +02:00
|
|
|
if (!m_targetSetupPage)
|
|
|
|
|
return;
|
|
|
|
|
|
2012-01-13 14:20:45 +01:00
|
|
|
const QString proFile =
|
|
|
|
|
QDir::cleanPath(path + QLatin1Char('/') + name + QLatin1Char('/')
|
|
|
|
|
+ name + QLatin1String(".pro"));
|
2012-05-14 18:55:30 +02:00
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
m_targetSetupPage->setProjectPath(proFile);
|
2010-04-19 16:11:21 +02:00
|
|
|
}
|