From 25f9d9c43481b0a02d632bf609417c4302fe1fe1 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 27 May 2019 10:24:56 +0200 Subject: [PATCH] Use QComboBox::currentTextChanged instead of currentIndexChanged QComboBox::currentIndexChanged is depcrecated as of Qt 5.13 and QComboBox::currentTextChanged is available since Qt 4.1 Change-Id: I97b8eb37765cbb7556cfbde87ea90f91f63bfa63 Reviewed-by: hjk --- src/libs/qmleditorwidgets/contextpanetextwidget.cpp | 2 +- src/plugins/coreplugin/dialogs/newdialog.cpp | 3 +-- src/plugins/scxmleditor/common/colorsettings.cpp | 2 +- src/plugins/texteditor/fontsettingspage.cpp | 3 +-- src/shared/help/bookmarkmanager.cpp | 3 +-- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp index 70b6c700db4..6a37637a6a0 100644 --- a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp @@ -103,7 +103,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) : connect(ui->bottomAlignmentButton, &QToolButton::toggled, this, &ContextPaneTextWidget::onVerticalAlignmentChanged); - connect(ui->styleComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(ui->styleComboBox, &QComboBox::currentTextChanged, this, &ContextPaneTextWidget::onStyleComboBoxChanged); } diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp index e691d826ed7..b4713e6a73b 100644 --- a/src/plugins/coreplugin/dialogs/newdialog.cpp +++ b/src/plugins/coreplugin/dialogs/newdialog.cpp @@ -230,8 +230,7 @@ NewDialog::NewDialog(QWidget *parent) : connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &NewDialog::accept); connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &NewDialog::reject); - connect(m_ui->comboBox, - QOverload::of(&QComboBox::currentIndexChanged), + connect(m_ui->comboBox, &QComboBox::currentTextChanged, this, &NewDialog::setSelectedPlatform); } diff --git a/src/plugins/scxmleditor/common/colorsettings.cpp b/src/plugins/scxmleditor/common/colorsettings.cpp index 8b952c253b5..4049db0646b 100644 --- a/src/plugins/scxmleditor/common/colorsettings.cpp +++ b/src/plugins/scxmleditor/common/colorsettings.cpp @@ -39,7 +39,7 @@ ColorSettings::ColorSettings(QWidget *parent) m_ui.setupUi(this); m_ui.m_colorThemeView->setEnabled(false); - connect(m_ui.m_comboColorThemes, QOverload::of(&QComboBox::currentIndexChanged), + connect(m_ui.m_comboColorThemes, &QComboBox::currentTextChanged, this, &ColorSettings::selectTheme); connect(m_ui.m_colorThemeView, &ColorThemeView::colorChanged, this, &ColorSettings::updateCurrentColors); connect(m_ui.m_addColorTheme, &QToolButton::clicked, this, &ColorSettings::createTheme); diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index 6911c844a84..26b7a707816 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -364,8 +364,7 @@ QWidget *FontSettingsPage::widget() connect(d_ptr->m_ui->fontComboBox, &QFontComboBox::currentFontChanged, this, &FontSettingsPage::fontSelected); - connect(d_ptr->m_ui->sizeComboBox, - QOverload::of(&QComboBox::currentIndexChanged), + connect(d_ptr->m_ui->sizeComboBox, &QComboBox::currentTextChanged, this, &FontSettingsPage::fontSizeSelected); connect(d_ptr->m_ui->zoomSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &FontSettingsPage::fontZoomChanged); diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index dc19b8e92ad..996d2bb02b9 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -95,8 +95,7 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title, &QStandardItemModel::itemChanged, this, &BookmarkDialog::itemChanged); - connect(ui.bookmarkFolders, - QOverload::of(&QComboBox::currentIndexChanged), + connect(ui.bookmarkFolders, &QComboBox::currentTextChanged, this, &BookmarkDialog::selectBookmarkFolder); connect(ui.treeView, &TreeView::customContextMenuRequested,