Commit b61413fe authored by hjk's avatar hjk

BareMetal: Modernize connections

Change-Id: I1d504da25b44dc60be7dca2b07f5eadbc437826c
Reviewed-by: default avatarTim Sander <tim@krieglstein.org>
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 3fe1b925
......@@ -47,7 +47,7 @@ BareMetalGdbCommandsDeployStepWidget::BareMetalGdbCommandsDeployStepWidget(BareM
m_commands = new QPlainTextEdit(this);
fl->addRow(tr("GDB commands:"), m_commands);
m_commands->setPlainText(m_step.gdbCommands());
connect(m_commands, SIGNAL(textChanged()), SLOT(update()));
connect(m_commands, &QPlainTextEdit::textChanged, this, &BareMetalGdbCommandsDeployStepWidget::update);
}
void BareMetalGdbCommandsDeployStepWidget::update()
......
......@@ -72,10 +72,12 @@ void BareMetalRunConfiguration::init()
{
setDefaultDisplayName(defaultDisplayName());
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated()));
connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated()));
connect(target(), SIGNAL(kitChanged()),
this, SLOT(handleBuildSystemDataUpdated())); // Handles device changes, etc.
connect(target(), &Target::deploymentDataChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated);
connect(target(), &Target::applicationTargetsChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated);
connect(target(), &Target::kitChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated); // Handles device changes, etc.
}
bool BareMetalRunConfiguration::isEnabled() const
......
......@@ -76,7 +76,8 @@ BareMetalRunConfigurationWidget::BareMetalRunConfigurationWidget(BareMetalRunCon
mainLayout->setMargin(0);
addGenericWidgets(mainLayout);
connect(d->runConfiguration, SIGNAL(enabledChanged()),SLOT(runConfigurationEnabledChange()));
connect(d->runConfiguration, &ProjectExplorer::RunConfiguration::enabledChanged,
this, &BareMetalRunConfigurationWidget::runConfigurationEnabledChange);
runConfigurationEnabledChange();
}
......@@ -121,11 +122,12 @@ void BareMetalRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayout)
d->workingDirLineEdit.setPlaceholderText(tr("<default>"));
d->workingDirLineEdit.setText(d->runConfiguration->workingDirectory());
d->genericWidgetsLayout.addRow(tr("Working directory:"), &d->workingDirLineEdit);
connect(&d->argsLineEdit, SIGNAL(textEdited(QString)), SLOT(argumentsEdited(QString)));
connect(d->runConfiguration, SIGNAL(targetInformationChanged()), this,
SLOT(updateTargetInformation()));
connect(&d->workingDirLineEdit, SIGNAL(textEdited(QString)),
SLOT(handleWorkingDirectoryChanged()));
connect(&d->argsLineEdit, &QLineEdit::textEdited,
this, &BareMetalRunConfigurationWidget::argumentsEdited);
connect(d->runConfiguration, &BareMetalRunConfiguration::targetInformationChanged,
this, &BareMetalRunConfigurationWidget::updateTargetInformation);
connect(&d->workingDirLineEdit, &QLineEdit::textEdited,
this, &BareMetalRunConfigurationWidget::handleWorkingDirectoryChanged);
}
void BareMetalRunConfigurationWidget::argumentsEdited(const QString &args)
......
......@@ -60,12 +60,12 @@ GdbServerProviderChooser::GdbServerProviderChooser(
layout->addWidget(m_manageButton);
setFocusProxy(m_manageButton);
connect(m_chooser, SIGNAL(currentIndexChanged(int)),
SLOT(currentIndexChanged(int)));
connect(m_manageButton, SIGNAL(clicked()),
SLOT(manageButtonClicked()));
connect(GdbServerProviderManager::instance(), SIGNAL(providersChanged()),
SLOT(populate()));
connect(m_chooser.data(), static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &GdbServerProviderChooser::currentIndexChanged);
connect(m_manageButton.data(), &QAbstractButton::clicked,
this, &GdbServerProviderChooser::manageButtonClicked);
connect(GdbServerProviderManager::instance(), &GdbServerProviderManager::providersChanged,
this, &GdbServerProviderChooser::populate);
}
QString GdbServerProviderChooser::currentProviderId() const
......
......@@ -308,8 +308,8 @@ OpenOcdGdbServerProviderConfigWidget::OpenOcdGdbServerProviderConfigWidget(
connect(m_resetCommandsTextEdit.data(), &QPlainTextEdit::textChanged,
this, &GdbServerProviderConfigWidget::dirty);
connect(m_startupModeComboBox, SIGNAL(currentIndexChanged(int)),
SLOT(startupModeChanged()));
connect(m_startupModeComboBox.data(), static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &OpenOcdGdbServerProviderConfigWidget::startupModeChanged);
}
void OpenOcdGdbServerProviderConfigWidget::startupModeChanged()
......
......@@ -297,18 +297,25 @@ StLinkUtilGdbServerProviderConfigWidget::StLinkUtilGdbServerProviderConfigWidget
connect(m_executableFileChooser.data(), &Utils::PathChooser::changed,
this, &GdbServerProviderConfigWidget::dirty);
connect(m_verboseLevelSpinBox, SIGNAL(valueChanged(int)), SIGNAL(dirty()));
connect(m_extendedModeCheckBox, SIGNAL(clicked()), SIGNAL(dirty()));
connect(m_resetBoardCheckBox, SIGNAL(clicked()), SIGNAL(dirty()));
connect(m_transportLayerComboBox, SIGNAL(currentIndexChanged(int)), SIGNAL(dirty()));
connect(m_verboseLevelSpinBox.data(),
static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &GdbServerProviderConfigWidget::dirty);
connect(m_extendedModeCheckBox.data(), &QAbstractButton::clicked,
this, &GdbServerProviderConfigWidget::dirty);
connect(m_resetBoardCheckBox.data(), &QAbstractButton::clicked,
this, &GdbServerProviderConfigWidget::dirty);
connect(m_transportLayerComboBox.data(),
static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &GdbServerProviderConfigWidget::dirty);
connect(m_initCommandsTextEdit.data(), &QPlainTextEdit::textChanged,
this, &GdbServerProviderConfigWidget::dirty);
connect(m_resetCommandsTextEdit.data(), &QPlainTextEdit::textChanged,
this, &GdbServerProviderConfigWidget::dirty);
connect(m_startupModeComboBox, SIGNAL(currentIndexChanged(int)),
SLOT(startupModeChanged()));
connect(m_startupModeComboBox.data(),
static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &StLinkUtilGdbServerProviderConfigWidget::startupModeChanged);
}
......
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