forked from qt-creator/qt-creator
ios: fix deploystep displayName updating
still uses the default deploystepconfiguration, which gives some artifacts (to be fixed later) Change-Id: I3f4f8a71fbe4e18fc171aee571da72da1c9735db Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
|
||||
#include <qmakeprojectmanager/qmakeproject.h>
|
||||
#include <qmakeprojectmanager/qmakenodes.h>
|
||||
@@ -82,14 +85,26 @@ void IosDeployStep::ctor()
|
||||
{
|
||||
m_toolHandler = 0;
|
||||
m_transferStatus = NoTransfer;
|
||||
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
||||
const QString devName = m_device.isNull() ? IosDevice::name() : m_device->displayName();
|
||||
cleanup();
|
||||
updateDisplayNames();
|
||||
connect(DeviceManager::instance(), SIGNAL(updated()),
|
||||
SLOT(updateDisplayNames()));
|
||||
connect(target(), SIGNAL(kitChanged()),
|
||||
SLOT(updateDisplayNames()));
|
||||
}
|
||||
|
||||
void IosDeployStep::updateDisplayNames()
|
||||
{
|
||||
ProjectExplorer::IDevice::ConstPtr dev =
|
||||
ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
||||
const QString devName = dev.isNull() ? IosDevice::name() : dev->displayName();
|
||||
setDefaultDisplayName(tr("Deploy to %1").arg(devName));
|
||||
setDisplayName(tr("Deploy to %1").arg(devName));
|
||||
}
|
||||
|
||||
bool IosDeployStep::init()
|
||||
{
|
||||
QTC_CHECK(m_transferStatus == NoTransfer);
|
||||
QTC_ASSERT(m_transferStatus == NoTransfer, return false);
|
||||
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
||||
IosRunConfiguration * runConfig = qobject_cast<IosRunConfiguration *>(
|
||||
this->target()->activeRunConfiguration());
|
||||
|
||||
Reference in New Issue
Block a user