ProjectExplorer: Rename KitInformation to KitAspect

The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-02-06 12:50:51 +01:00
parent 46c287fee5
commit 83dd031960
156 changed files with 1156 additions and 1156 deletions

View File

@@ -188,7 +188,7 @@ void QmlProject::setMainFile(const QString &mainFilePath)
Utils::FileName QmlProject::targetDirectory(const Target *target) const
{
if (DeviceTypeKitInformation::deviceTypeId(target->kit())
if (DeviceTypeKitAspect::deviceTypeId(target->kit())
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
return canonicalProjectDir();
@@ -277,11 +277,11 @@ QList<Task> QmlProject::projectIssues(const Kit *k) const
{
QList<Task> result = Project::projectIssues(k);
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
if (!version)
result.append(createProjectTask(Task::TaskType::Error, tr("No Qt version set in kit.")));
IDevice::ConstPtr dev = DeviceKitInformation::device(k);
IDevice::ConstPtr dev = DeviceKitAspect::device(k);
if (dev.isNull())
result.append(createProjectTask(Task::TaskType::Error, tr("Kit has no device.")));
@@ -371,7 +371,7 @@ void QmlProject::updateDeploymentData(ProjectExplorer::Target *target)
if (!m_projectItem)
return;
if (DeviceTypeKitInformation::deviceTypeId(target->kit())
if (DeviceTypeKitAspect::deviceTypeId(target->kit())
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
return;
}

View File

@@ -56,7 +56,7 @@ Environment QmlProjectEnvironmentAspect::baseEnvironment() const
QmlProjectEnvironmentAspect::QmlProjectEnvironmentAspect(Target *target)
: m_target(target)
{
if (DeviceTypeKitInformation::deviceTypeId(target->kit())
if (DeviceTypeKitAspect::deviceTypeId(target->kit())
== Constants::DESKTOP_DEVICE_TYPE)
addPreferredBaseEnvironment(SystemEnvironmentBase, tr("System Environment"));

View File

@@ -313,7 +313,7 @@ QString QmlProjectRunConfiguration::disabledReason() const
{
if (mainScript().isEmpty())
return tr("No script file to execute.");
if (DeviceTypeKitInformation::deviceTypeId(target()->kit())
if (DeviceTypeKitAspect::deviceTypeId(target()->kit())
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
&& !QFileInfo::exists(executable())) {
return tr("No qmlscene found.");
@@ -329,11 +329,11 @@ QString QmlProjectRunConfiguration::executable() const
if (!qmlViewer.isEmpty())
return qmlViewer;
BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
BaseQtVersion *version = QtKitAspect::qtVersion(target()->kit());
if (!version) // No Qt version in Kit. Don't try to run qmlscene.
return QString();
const Id deviceType = DeviceTypeKitInformation::deviceTypeId(target()->kit());
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(target()->kit());
if (deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
// If not given explicitly by Qt Version, try to pick it from $PATH.
return version->type() == QtSupport::Constants::DESKTOPQT
@@ -341,7 +341,7 @@ QString QmlProjectRunConfiguration::executable() const
: QString("qmlscene");
}
IDevice::ConstPtr dev = DeviceKitInformation::device(target()->kit());
IDevice::ConstPtr dev = DeviceKitAspect::device(target()->kit());
if (dev.isNull()) // No device set. We don't know where to run qmlscene.
return QString();
@@ -355,7 +355,7 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
// arguments in .user file
QString args = aspect<ArgumentsAspect>()->arguments(macroExpander());
const Target *currentTarget = target();
const IDevice::ConstPtr device = DeviceKitInformation::device(currentTarget->kit());
const IDevice::ConstPtr device = DeviceKitAspect::device(currentTarget->kit());
const Utils::OsType osType = device ? device->osType() : Utils::HostOsInfo::hostOs();
// arguments from .qmlproject file