forked from qt-creator/qt-creator
Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -169,7 +169,7 @@ SerialOutputPane::SerialOutputPane(Settings &settings) :
|
||||
updateLineEndingsComboBox();
|
||||
inputLayout->addWidget(m_lineEndingsSelection);
|
||||
|
||||
connect(m_lineEndingsSelection, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(m_lineEndingsSelection, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &SerialOutputPane::defaultLineEndingChanged);
|
||||
|
||||
layout->addLayout(inputLayout);
|
||||
@@ -393,7 +393,7 @@ void SerialOutputPane::createToolButtons()
|
||||
m_portsSelection->setModel(m_devicesModel);
|
||||
updatePortsList();
|
||||
connect(m_portsSelection, &ComboBox::opened, this, &SerialOutputPane::updatePortsList);
|
||||
connect(m_portsSelection, static_cast<void (ComboBox::*)(int)>(&ComboBox::currentIndexChanged),
|
||||
connect(m_portsSelection, QOverload<int>::of(&ComboBox::currentIndexChanged),
|
||||
this, &SerialOutputPane::activePortNameChanged);
|
||||
// TODO: the ports are not updated with the box opened (if the user wait for it) -> add a timer?
|
||||
|
||||
@@ -402,7 +402,7 @@ void SerialOutputPane::createToolButtons()
|
||||
m_baudRateSelection = new ComboBox;
|
||||
m_baudRateSelection->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
m_baudRateSelection->addItems(m_devicesModel->baudRates());
|
||||
connect(m_baudRateSelection, static_cast<void (ComboBox::*)(int)>(&ComboBox::currentIndexChanged),
|
||||
connect(m_baudRateSelection, QOverload<int>::of(&ComboBox::currentIndexChanged),
|
||||
this, &SerialOutputPane::activeBaudRateChanged);
|
||||
|
||||
if (m_settings.baudRate > 0)
|
||||
|
||||
Reference in New Issue
Block a user