forked from qt-creator/qt-creator
s/profile/kit/
* Rename profiles to kits.
* Update some strings:
* projects mode has a Kits tab, not a Targets tab.
* " Settings" was dropped from the sub-tabs of the Kits tab
* menu entry "Build/Open Build/Run Target Selector" was renamed
to "Build/Open Build and Run Kits Selector".
* Use "Kit" instead of "Target" in miniprojecttargetselector.
(The class was not renamed as it does indeed select targets,
not kits)
Change-Id: I0727e086e2dfa0e8aaaf89fdc6f2e3596c7a4314
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Eike Ziller
parent
328d205b62
commit
8ba422d07c
@@ -36,12 +36,12 @@
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/gnumakeparser.h>
|
||||
#include <projectexplorer/ioutputparser.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtparser.h>
|
||||
#include <qtsupport/qtprofileinformation.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QInputDialog>
|
||||
@@ -113,11 +113,11 @@ ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() co
|
||||
{
|
||||
ProjectExplorer::IOutputParser *parserchain = new ProjectExplorer::GnuMakeParser;
|
||||
|
||||
int versionId = QtSupport::QtProfileInformation::qtVersionId(target()->profile());
|
||||
int versionId = QtSupport::QtKitInformation::qtVersionId(target()->kit());
|
||||
if (versionId >= 0)
|
||||
parserchain->appendOutputParser(new QtSupport::QtParser);
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
|
||||
if (tc)
|
||||
parserchain->appendOutputParser(tc->outputParser());
|
||||
return parserchain;
|
||||
@@ -126,7 +126,7 @@ ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() co
|
||||
Utils::Environment CMakeBuildConfiguration::baseEnvironment() const
|
||||
{
|
||||
Utils::Environment env = BuildConfiguration::baseEnvironment();
|
||||
target()->profile()->addToEnvironment(env);
|
||||
target()->kit()->addToEnvironment(env);
|
||||
return env;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer
|
||||
|
||||
bool CMakeBuildConfigurationFactory::canHandle(const ProjectExplorer::Target *t) const
|
||||
{
|
||||
if (!t->project()->supportsProfile(t->profile()))
|
||||
if (!t->project()->supportsKit(t->kit()))
|
||||
return false;
|
||||
return qobject_cast<CMakeProject *>(t->project());
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/profilemanager.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/abi.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
@@ -405,13 +405,13 @@ void CMakeRunPage::initializePage()
|
||||
m_generatorComboBox->clear();
|
||||
bool hasCodeBlocksGenerator = m_cmakeWizard->cmakeManager()->hasCodeBlocksMsvcGenerator();
|
||||
|
||||
QList<ProjectExplorer::Profile *> profileList =
|
||||
ProjectExplorer::ProfileManager::instance()->profiles();
|
||||
QList<ProjectExplorer::Kit *> kitList =
|
||||
ProjectExplorer::KitManager::instance()->kits();
|
||||
|
||||
foreach (ProjectExplorer::Profile *p, profileList) {
|
||||
QVariant profileVariant = qVariantFromValue(static_cast<void *>(p));
|
||||
foreach (ProjectExplorer::Kit *k, kitList) {
|
||||
QVariant kitVariant = qVariantFromValue(static_cast<void *>(k));
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
|
||||
if (!tc)
|
||||
continue;
|
||||
ProjectExplorer::Abi targetAbi = tc->targetAbi();
|
||||
@@ -421,21 +421,21 @@ void CMakeRunPage::initializePage()
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) {
|
||||
if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles"))
|
||||
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant);
|
||||
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(k->displayName()), kitVariant);
|
||||
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
||||
#ifdef Q_OS_WIN
|
||||
if (cachedGenerator.isEmpty() || cachedGenerator == "MinGW Makefiles")
|
||||
m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(p->displayName()), profileVariant);
|
||||
m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(p->displayName()), kitVariant);
|
||||
#else
|
||||
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles")
|
||||
m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(p->displayName()), profileVariant);
|
||||
m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(k->displayName()), kitVariant);
|
||||
#endif
|
||||
|
||||
}
|
||||
} else {
|
||||
// Non windows
|
||||
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles")
|
||||
m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(p->displayName()), profileVariant);
|
||||
m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(k->displayName()), kitVariant);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -448,15 +448,15 @@ void CMakeRunPage::runCMake()
|
||||
|
||||
int index = m_generatorComboBox->currentIndex();
|
||||
|
||||
ProjectExplorer::Profile *p = 0;
|
||||
ProjectExplorer::Kit *p = 0;
|
||||
if (index >= 0)
|
||||
p = static_cast<ProjectExplorer::Profile *>(m_generatorComboBox->itemData(index).value<void *>());
|
||||
p = static_cast<ProjectExplorer::Kit *>(m_generatorComboBox->itemData(index).value<void *>());
|
||||
if (!p) {
|
||||
m_output->appendPlainText(tr("No generator selected."));
|
||||
return;
|
||||
}
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(p);
|
||||
|
||||
m_runCMake->setEnabled(false);
|
||||
m_argumentsLineEdit->setEnabled(false);
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
#include <projectexplorer/buildenvironmentwidget.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/profilemanager.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qtsupport/customexecutablerunconfiguration.h>
|
||||
@@ -286,7 +286,7 @@ bool CMakeProject::parseCMakeLists()
|
||||
|
||||
createUiCodeModelSupport();
|
||||
|
||||
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(activeTarget()->profile());
|
||||
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
|
||||
if (!tc) {
|
||||
emit buildTargetsChanged();
|
||||
emit fileListChanged();
|
||||
@@ -530,9 +530,9 @@ bool CMakeProject::fromMap(const QVariantMap &map)
|
||||
if (!Project::fromMap(map))
|
||||
return false;
|
||||
|
||||
Profile *defaultProfile = ProfileManager::instance()->defaultProfile();
|
||||
if (!activeTarget() && defaultProfile)
|
||||
addTarget(createTarget(defaultProfile));
|
||||
Kit *defaultKit = KitManager::instance()->defaultKit();
|
||||
if (!activeTarget() && defaultKit)
|
||||
addTarget(createTarget(defaultKit));
|
||||
|
||||
// We have a user file, but we could still be missing the cbp file
|
||||
// or simply run createXml with the saved settings
|
||||
|
||||
@@ -496,7 +496,7 @@ QString CMakeRunConfigurationFactory::displayNameForId(const Core::Id id) const
|
||||
|
||||
bool CMakeRunConfigurationFactory::canHandle(ProjectExplorer::Target *parent) const
|
||||
{
|
||||
if (!parent->project()->supportsProfile(parent->profile()))
|
||||
if (!parent->project()->supportsKit(parent->kit()))
|
||||
return false;
|
||||
return qobject_cast<CMakeProject *>(parent->project());
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
#include <projectexplorer/gnumakeparser.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
@@ -137,7 +137,7 @@ bool MakeStep::init()
|
||||
|
||||
setIgnoreReturnValue(m_clean);
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
|
||||
ProcessParameters *pp = processParameters();
|
||||
pp->setMacroExpander(bc->macroExpander());
|
||||
pp->setEnvironment(bc->environment());
|
||||
@@ -308,7 +308,7 @@ void MakeStepConfigWidget::updateDetails()
|
||||
return;
|
||||
}
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
|
||||
if (tc) {
|
||||
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->buildTargets());
|
||||
Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments());
|
||||
@@ -321,7 +321,7 @@ void MakeStepConfigWidget::updateDetails()
|
||||
param.setArguments(arguments);
|
||||
m_summaryText = param.summary(displayName());
|
||||
} else {
|
||||
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
|
||||
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
|
||||
}
|
||||
emit updateSummary();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user