Commit 2913a75d authored by Tobias Hunger's avatar Tobias Hunger

KitInformationConfigWidget: Use Qt5 style connects

Change-Id: I3a04bed8e6b64f2c279eb06dc4b4af7e001415f1
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 95b0dc91
...@@ -74,7 +74,8 @@ SysRootInformationConfigWidget::SysRootInformationConfigWidget(Kit *k, const Kit ...@@ -74,7 +74,8 @@ SysRootInformationConfigWidget::SysRootInformationConfigWidget(Kit *k, const Kit
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
m_chooser->setHistoryCompleter(QLatin1String("PE.SysRoot.History")); m_chooser->setHistoryCompleter(QLatin1String("PE.SysRoot.History"));
m_chooser->setFileName(SysRootKitInformation::sysRoot(k)); m_chooser->setFileName(SysRootKitInformation::sysRoot(k));
connect(m_chooser, SIGNAL(rawPathChanged(QString)), this, SLOT(pathWasChanged())); connect(m_chooser, &Utils::PathChooser::rawPathChanged,
this, &SysRootInformationConfigWidget::pathWasChanged);
} }
SysRootInformationConfigWidget::~SysRootInformationConfigWidget() SysRootInformationConfigWidget::~SysRootInformationConfigWidget()
...@@ -134,11 +135,13 @@ ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, const ...@@ -134,11 +135,13 @@ ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, const
m_comboBox->setToolTip(toolTip()); m_comboBox->setToolTip(toolTip());
refresh(); refresh();
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentToolChainChanged(int))); connect(m_comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &ToolChainInformationConfigWidget::currentToolChainChanged);
m_manageButton = new QPushButton(KitConfigWidget::msgManage()); m_manageButton = new QPushButton(KitConfigWidget::msgManage());
m_manageButton->setContentsMargins(0, 0, 0, 0); m_manageButton->setContentsMargins(0, 0, 0, 0);
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageToolChains())); connect(m_manageButton, &QAbstractButton::clicked,
this, &ToolChainInformationConfigWidget::manageToolChains);
} }
ToolChainInformationConfigWidget::~ToolChainInformationConfigWidget() ToolChainInformationConfigWidget::~ToolChainInformationConfigWidget()
...@@ -234,7 +237,8 @@ DeviceTypeInformationConfigWidget::DeviceTypeInformationConfigWidget(Kit *workin ...@@ -234,7 +237,8 @@ DeviceTypeInformationConfigWidget::DeviceTypeInformationConfigWidget(Kit *workin
m_comboBox->setToolTip(toolTip()); m_comboBox->setToolTip(toolTip());
refresh(); refresh();
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentTypeChanged(int))); connect(m_comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &DeviceTypeInformationConfigWidget::currentTypeChanged);
} }
DeviceTypeInformationConfigWidget::~DeviceTypeInformationConfigWidget() DeviceTypeInformationConfigWidget::~DeviceTypeInformationConfigWidget()
...@@ -299,10 +303,14 @@ DeviceInformationConfigWidget::DeviceInformationConfigWidget(Kit *workingCopy, c ...@@ -299,10 +303,14 @@ DeviceInformationConfigWidget::DeviceInformationConfigWidget(Kit *workingCopy, c
refresh(); refresh();
m_comboBox->setToolTip(toolTip()); m_comboBox->setToolTip(toolTip());
connect(m_model, SIGNAL(modelAboutToBeReset()), SLOT(modelAboutToReset())); connect(m_model, &QAbstractItemModel::modelAboutToBeReset,
connect(m_model, SIGNAL(modelReset()), SLOT(modelReset())); this, &DeviceInformationConfigWidget::modelAboutToReset);
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentDeviceChanged())); connect(m_model, &QAbstractItemModel::modelReset,
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageDevices())); this, &DeviceInformationConfigWidget::modelReset);
connect(m_comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &DeviceInformationConfigWidget::currentDeviceChanged);
connect(m_manageButton, &QAbstractButton::clicked,
this, &DeviceInformationConfigWidget::manageDevices);
} }
DeviceInformationConfigWidget::~DeviceInformationConfigWidget() DeviceInformationConfigWidget::~DeviceInformationConfigWidget()
...@@ -380,7 +388,8 @@ KitEnvironmentConfigWidget::KitEnvironmentConfigWidget(Kit *workingCopy, const K ...@@ -380,7 +388,8 @@ KitEnvironmentConfigWidget::KitEnvironmentConfigWidget(Kit *workingCopy, const K
{ {
refresh(); refresh();
m_manageButton->setText(tr("Change...")); m_manageButton->setText(tr("Change..."));
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(editEnvironmentChanges())); connect(m_manageButton, &QAbstractButton::clicked,
this, &KitEnvironmentConfigWidget::editEnvironmentChanges);
} }
QWidget *KitEnvironmentConfigWidget::mainWidget() const QWidget *KitEnvironmentConfigWidget::mainWidget() const
...@@ -441,11 +450,12 @@ void KitEnvironmentConfigWidget::editEnvironmentChanges() ...@@ -441,11 +450,12 @@ void KitEnvironmentConfigWidget::editEnvironmentChanges()
layout->addWidget(m_editor); layout->addWidget(m_editor);
layout->addWidget(buttons); layout->addWidget(buttons);
connect(buttons, SIGNAL(accepted()), m_dialog, SLOT(accept())); connect(buttons, &QDialogButtonBox::accepted, m_dialog, &QDialog::accept);
connect(buttons, SIGNAL(rejected()), m_dialog, SLOT(reject())); connect(buttons, &QDialogButtonBox::rejected, m_dialog, &QDialog::reject);
connect(m_dialog, SIGNAL(accepted()), this, SLOT(acceptChangesDialog())); connect(m_dialog, &QDialog::accepted, this, &KitEnvironmentConfigWidget::acceptChangesDialog);
connect(m_dialog, SIGNAL(rejected()), this, SLOT(closeChangesDialog())); connect(m_dialog, &QDialog::rejected, this, &KitEnvironmentConfigWidget::closeChangesDialog);
connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(applyChanges())); connect(buttons->button(QDialogButtonBox::Apply), &QAbstractButton::clicked,
this, &KitEnvironmentConfigWidget::applyChanges);
refresh(); refresh();
m_dialog->show(); m_dialog->show();
......
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