forked from qt-creator/qt-creator
ProjectExplorer: Introduce a ProjectConfiguration::kit() function
For convenience, and use it in some places. Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -226,7 +226,7 @@ void QmlBuildSystem::setMainFile(const QString &mainFilePath)
|
||||
|
||||
Utils::FilePath QmlBuildSystem::targetDirectory() const
|
||||
{
|
||||
if (DeviceTypeKitAspect::deviceTypeId(target()->kit())
|
||||
if (DeviceTypeKitAspect::deviceTypeId(kit())
|
||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
|
||||
return canonicalProjectDir();
|
||||
|
||||
@@ -389,7 +389,7 @@ void QmlBuildSystem::updateDeploymentData()
|
||||
if (!m_projectItem)
|
||||
return;
|
||||
|
||||
if (DeviceTypeKitAspect::deviceTypeId(target()->kit())
|
||||
if (DeviceTypeKitAspect::deviceTypeId(kit())
|
||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ QString QmlProjectRunConfiguration::disabledReason() const
|
||||
return tr("No script file to execute.");
|
||||
|
||||
const FilePath viewer = qmlScenePath();
|
||||
if (DeviceTypeKitAspect::deviceTypeId(target()->kit())
|
||||
if (DeviceTypeKitAspect::deviceTypeId(kit())
|
||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
|
||||
&& !viewer.exists()) {
|
||||
return tr("No qmlscene found.");
|
||||
@@ -198,7 +198,7 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
|
||||
{
|
||||
// arguments in .user file
|
||||
QString args = aspect<ArgumentsAspect>()->arguments(macroExpander());
|
||||
const IDevice::ConstPtr device = DeviceKitAspect::device(target()->kit());
|
||||
const IDevice::ConstPtr device = DeviceKitAspect::device(kit());
|
||||
const OsType osType = device ? device->osType() : HostOsInfo::hostOs();
|
||||
|
||||
// arguments from .qmlproject file
|
||||
|
||||
Reference in New Issue
Block a user