Commit 3be770ee authored by Tobias Hunger's avatar Tobias Hunger

Target: Use Qt5-style connects

Make the slots private now, remove protected as nothing inherits
from Target.

Change-Id: I4aaa4402ef6ee83a27dd6233f188a507e9de8169
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 3bb3ece5
......@@ -127,18 +127,15 @@ Target::Target(Project *project, Kit *k) :
ProjectConfiguration(project, k->id()),
d(new TargetPrivate)
{
connect(DeviceManager::instance(), SIGNAL(updated()), this, SLOT(updateDeviceState()));
connect(DeviceManager::instance(), &DeviceManager::updated, this, &Target::updateDeviceState);
d->m_kit = k;
setDisplayName(d->m_kit->displayName());
setIcon(d->m_kit->icon());
QObject *km = KitManager::instance();
connect(km, SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(handleKitUpdates(ProjectExplorer::Kit*)));
connect(km, SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
this, SLOT(handleKitRemoval(ProjectExplorer::Kit*)));
KitManager *km = KitManager::instance();
connect(km, &KitManager::kitUpdated, this, &Target::handleKitUpdates);
connect(km, &KitManager::kitRemoved, this, &Target::handleKitRemoval);
Utils::MacroExpander *expander = macroExpander();
expander->setDisplayName(tr("Target Settings"));
......@@ -251,12 +248,12 @@ void Target::addBuildConfiguration(BuildConfiguration *configuration)
emit addedBuildConfiguration(configuration);
connect(configuration, SIGNAL(environmentChanged()),
SLOT(changeEnvironment()));
connect(configuration, SIGNAL(enabledChanged()),
this, SLOT(changeBuildConfigurationEnabled()));
connect(configuration, SIGNAL(buildDirectoryChanged()),
SLOT(onBuildDirectoryChanged()));
connect(configuration, &BuildConfiguration::environmentChanged,
this, &Target::changeEnvironment);
connect(configuration, &BuildConfiguration::enabledChanged,
this, &Target::changeBuildConfigurationEnabled);
connect(configuration, &BuildConfiguration::buildDirectoryChanged,
this, &Target::onBuildDirectoryChanged);
if (!activeBuildConfiguration())
setActiveBuildConfiguration(configuration);
......@@ -326,7 +323,8 @@ void Target::addDeployConfiguration(DeployConfiguration *dc)
// add it
d->m_deployConfigurations.push_back(dc);
connect(dc, SIGNAL(enabledChanged()), this, SLOT(changeDeployConfigurationEnabled()));
connect(dc, &DeployConfiguration::enabledChanged,
this, &Target::changeDeployConfigurationEnabled);
emit addedDeployConfiguration(dc);
......@@ -427,7 +425,8 @@ void Target::addRunConfiguration(RunConfiguration* runConfiguration)
d->m_runConfigurations.push_back(runConfiguration);
connect(runConfiguration, SIGNAL(enabledChanged()), this, SLOT(changeRunConfigurationEnabled()));
connect(runConfiguration, &RunConfiguration::enabledChanged,
this, &Target::changeRunConfigurationEnabled);
emit addedRunConfiguration(runConfiguration);
......
......@@ -157,18 +157,14 @@ signals:
/// build configuration was changed.
void buildDirectoryChanged();
public slots:
void onBuildDirectoryChanged();
protected:
private:
void setEnabled(bool);
bool fromMap(const QVariantMap &map) override;
protected slots:
void updateDeviceState();
void onBuildDirectoryChanged();
private slots:
void changeEnvironment();
void changeBuildConfigurationEnabled();
void changeDeployConfigurationEnabled();
......@@ -177,7 +173,6 @@ private slots:
void handleKitUpdates(ProjectExplorer::Kit *k);
void handleKitRemoval(ProjectExplorer::Kit *k);
private:
void setActiveBuildConfiguration(BuildConfiguration *configuration);
void setActiveDeployConfiguration(DeployConfiguration *configuration);
TargetPrivate *d;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment