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 <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2019-05-27 10:24:56 +02:00
parent 4b92b7ac60
commit 25f9d9c434
5 changed files with 5 additions and 8 deletions

View File

@@ -103,7 +103,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) :
connect(ui->bottomAlignmentButton, &QToolButton::toggled,
this, &ContextPaneTextWidget::onVerticalAlignmentChanged);
connect(ui->styleComboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
connect(ui->styleComboBox, &QComboBox::currentTextChanged,
this, &ContextPaneTextWidget::onStyleComboBoxChanged);
}

View File

@@ -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<const QString &>::of(&QComboBox::currentIndexChanged),
connect(m_ui->comboBox, &QComboBox::currentTextChanged,
this, &NewDialog::setSelectedPlatform);
}

View File

@@ -39,7 +39,7 @@ ColorSettings::ColorSettings(QWidget *parent)
m_ui.setupUi(this);
m_ui.m_colorThemeView->setEnabled(false);
connect(m_ui.m_comboColorThemes, QOverload<const QString &>::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);

View File

@@ -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<const QString &>::of(&QComboBox::currentIndexChanged),
connect(d_ptr->m_ui->sizeComboBox, &QComboBox::currentTextChanged,
this, &FontSettingsPage::fontSizeSelected);
connect(d_ptr->m_ui->zoomSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, &FontSettingsPage::fontZoomChanged);

View File

@@ -95,8 +95,7 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
&QStandardItemModel::itemChanged,
this, &BookmarkDialog::itemChanged);
connect(ui.bookmarkFolders,
QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
connect(ui.bookmarkFolders, &QComboBox::currentTextChanged,
this, &BookmarkDialog::selectBookmarkFolder);
connect(ui.treeView, &TreeView::customContextMenuRequested,