summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVitaly Fanaskov <vitaly.fanaskov@qt.io>2020-02-05 16:09:21 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-19 11:32:40 +0000
commit3703a28511bed9daea2af57409db150cb3ed1a23 (patch)
tree50dbb5505425029a546abd9117d5a26916c7be16 /src
parent181bece09afef4e6c3b47e1d246eb7e3ba56d84f (diff)
QComboBox: remove currentIndexChanged(const QString&)
Fixes: QTBUG-81913 Task-number: QTBUG-81845 Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp4
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp2
-rw-r--r--src/printsupport/widgets/qcupsjobwidget.cpp2
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp30
-rw-r--r--src/widgets/widgets/qcombobox.h6
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp2
7 files changed, 6 insertions, 42 deletions
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index 185349af11..2b7c0ce6ec 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -276,7 +276,7 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent)
connect(m_ui.unitCombo, &QComboBox::activated, this, &QPageSetupWidget::unitChanged);
- connect(m_ui.pageSizeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pageSizeChanged);
+ connect(m_ui.pageSizeCombo, &QComboBox::currentIndexChanged, this, &QPageSetupWidget::pageSizeChanged);
connect(m_ui.pageWidth, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::pageSizeChanged);
connect(m_ui.pageHeight, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::pageSizeChanged);
@@ -288,7 +288,7 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent)
connect(m_ui.portrait, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged);
connect(m_ui.landscape, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged);
- connect(m_ui.pagesPerSheetCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pagesPerSheetChanged);
+ connect(m_ui.pagesPerSheetCombo, &QComboBox::currentIndexChanged, this, &QPageSetupWidget::pagesPerSheetChanged);
}
// Init the Units combo box
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index bf77666c41..f3b47bcbd2 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -487,7 +487,7 @@ bool QPrintPropertiesDialog::createAdvancedOptionsWidget()
if (choicesCb->count() > 1) {
- connect(choicesCb, QOverload<int>::of(&QComboBox::currentIndexChanged), this, setPpdOptionFromCombo);
+ connect(choicesCb, &QComboBox::currentIndexChanged, this, setPpdOptionFromCombo);
// We need an extra label at the end to show the conflict warning
QWidget *choicesCbWithLabel = new QWidget();
diff --git a/src/printsupport/widgets/qcupsjobwidget.cpp b/src/printsupport/widgets/qcupsjobwidget.cpp
index 456ed9db19..6d9e7432bc 100644
--- a/src/printsupport/widgets/qcupsjobwidget.cpp
+++ b/src/printsupport/widgets/qcupsjobwidget.cpp
@@ -125,7 +125,7 @@ void QCupsJobWidget::initJobHold()
m_ui.jobHoldComboBox->addItem(tr("Weekend (Saturday to Sunday)"), QVariant::fromValue(QCUPSSupport::Weekend));
m_ui.jobHoldComboBox->addItem(tr("Specific Time"), QVariant::fromValue(QCUPSSupport::SpecificTime));
- connect(m_ui.jobHoldComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QCupsJobWidget::toggleJobHoldTime);
+ connect(m_ui.jobHoldComboBox, &QComboBox::currentIndexChanged, this, &QCupsJobWidget::toggleJobHoldTime);
QCUPSSupport::JobHoldUntilWithTime jobHoldWithTime;
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index eeb0613d79..479e45ff56 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -300,7 +300,7 @@ void QInputDialogPrivate::ensureComboBox()
comboBox->hide();
QObject::connect(comboBox, SIGNAL(editTextChanged(QString)),
q, SLOT(_q_textChanged(QString)));
- QObject::connect(comboBox, SIGNAL(currentIndexChanged(QString)),
+ QObject::connect(comboBox, SIGNAL(currentTextChanged(QString)),
q, SLOT(_q_textChanged(QString)));
}
}
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 3cfa213245..9c1bd1e79a 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -933,29 +933,6 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
*/
/*!
- \fn void QComboBox::currentIndexChanged(int index)
- \since 4.1
-
- This signal is sent whenever the currentIndex in the combobox
- changes either through user interaction or programmatically. The
- item's \a index is passed or -1 if the combobox becomes empty or the
- currentIndex was reset.
-
- \obsolete Use currentIndexChanged(int index, const QString &text) instead
-*/
-
-/*!
- \fn void QComboBox::currentIndexChanged(const QString &text)
- \since 4.1
-
- This signal is sent whenever the currentIndex in the combobox
- changes either through user interaction or programmatically. The
- item's \a text is passed.
-
- \obsolete Use currentIndexChanged(int index, const QString &text) instead
-*/
-
-/*!
\fn void QComboBox::currentIndexChanged(int index, const QString &text)
\since 5.15
@@ -1435,13 +1412,6 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index)
{
Q_Q(QComboBox);
const QString text = itemText(index);
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_WARNING_PUSH
- QT_WARNING_DISABLE_DEPRECATED
- emit q->currentIndexChanged(index.row());
- emit q->currentIndexChanged(text);
- QT_WARNING_POP
-#endif
emit q->currentIndexChanged(index.row(), text);
// signal lineEdit.textChanged already connected to signal currentTextChanged, so don't emit double here
if (!lineEdit)
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index 56386a4b8c..444c834e88 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -230,12 +230,6 @@ Q_SIGNALS:
void textActivated(const QString &);
void highlighted(int index);
void textHighlighted(const QString &);
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_DEPRECATED_VERSION_X_5_15("Use currentIndexChanged(int, const QString &) instead")
- void currentIndexChanged(int index);
- QT_DEPRECATED_VERSION_X_5_15("Use currentIndexChanged(int, const QString &) instead")
- void currentIndexChanged(const QString &);
-#endif
void currentIndexChanged(int index, const QString &text);
void currentTextChanged(const QString &);
diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp
index 4a99b0f962..cb665de889 100644
--- a/src/widgets/widgets/qfontcombobox.cpp
+++ b/src/widgets/widgets/qfontcombobox.cpp
@@ -427,7 +427,7 @@ QFontComboBox::QFontComboBox(QWidget *parent)
lview->setUniformItemSizes(true);
setWritingSystem(QFontDatabase::Any);
- connect(this, SIGNAL(currentIndexChanged(QString)),
+ connect(this, SIGNAL(currentTextChanged(QString)),
this, SLOT(_q_currentChanged(QString)));
connect(qApp, SIGNAL(fontDatabaseChanged()),