diff options
author | hjk <hjk@qt.io> | 2019-02-26 09:40:49 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-02-26 15:18:14 +0000 |
commit | 6f37348b4c9f00879787374672d42ca1d14083bc (patch) | |
tree | 6196c3674e82fb5ab00a07ade44c0a509d7dc164 /src/plugins/scxmleditor | |
parent | 44a42db1ae4460142185e429ff6b39e37d6e3623 (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 <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/scxmleditor')
-rw-r--r-- | src/plugins/scxmleditor/common/colorsettings.cpp | 3 | ||||
-rw-r--r-- | src/plugins/scxmleditor/common/stateproperties.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/scxmleditor/common/colorsettings.cpp b/src/plugins/scxmleditor/common/colorsettings.cpp index cb3f1cee17..8b952c253b 100644 --- a/src/plugins/scxmleditor/common/colorsettings.cpp +++ b/src/plugins/scxmleditor/common/colorsettings.cpp @@ -39,7 +39,8 @@ ColorSettings::ColorSettings(QWidget *parent) m_ui.setupUi(this); m_ui.m_colorThemeView->setEnabled(false); - connect(m_ui.m_comboColorThemes, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), this, &ColorSettings::selectTheme); + connect(m_ui.m_comboColorThemes, QOverload<const QString &>::of(&QComboBox::currentIndexChanged), + this, &ColorSettings::selectTheme); connect(m_ui.m_colorThemeView, &ColorThemeView::colorChanged, this, &ColorSettings::updateCurrentColors); connect(m_ui.m_addColorTheme, &QToolButton::clicked, this, &ColorSettings::createTheme); connect(m_ui.m_removeColorTheme, &QToolButton::clicked, this, &ColorSettings::removeTheme); diff --git a/src/plugins/scxmleditor/common/stateproperties.cpp b/src/plugins/scxmleditor/common/stateproperties.cpp index 8a9d0aa3b2..b9797aeed3 100644 --- a/src/plugins/scxmleditor/common/stateproperties.cpp +++ b/src/plugins/scxmleditor/common/stateproperties.cpp @@ -50,7 +50,7 @@ StateProperties::StateProperties(QWidget *parent) m_contentTimer.setInterval(500); m_contentTimer.setSingleShot(true); - connect(m_contentEdit, &QPlainTextEdit::textChanged, &m_contentTimer, static_cast<void (QTimer::*)()>(&QTimer::start)); + connect(m_contentEdit, &QPlainTextEdit::textChanged, &m_contentTimer, QOverload<>::of(&QTimer::start)); connect(&m_contentTimer, &QTimer::timeout, this, &StateProperties::timerTimeout); } |