aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/serialterminal
diff options
context:
space:
mode:
authorhjk <[email protected]>2019-02-26 09:40:49 +0100
committerhjk <[email protected]>2019-02-26 15:18:14 +0000
commit6f37348b4c9f00879787374672d42ca1d14083bc (patch)
tree6196c3674e82fb5ab00a07ade44c0a509d7dc164 /src/plugins/serialterminal
parent44a42db1ae4460142185e429ff6b39e37d6e3623 (diff)
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 <[email protected]>
Diffstat (limited to 'src/plugins/serialterminal')
-rw-r--r--src/plugins/serialterminal/serialoutputpane.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/serialterminal/serialoutputpane.cpp b/src/plugins/serialterminal/serialoutputpane.cpp
index cf3a9a2f147..befc7e51a5e 100644
--- a/src/plugins/serialterminal/serialoutputpane.cpp
+++ b/src/plugins/serialterminal/serialoutputpane.cpp
@@ -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)