From 3703a28511bed9daea2af57409db150cb3ed1a23 Mon Sep 17 00:00:00 2001 From: Vitaly Fanaskov Date: Wed, 5 Feb 2020 16:09:21 +0100 Subject: QComboBox: remove currentIndexChanged(const QString&) Fixes: QTBUG-81913 Task-number: QTBUG-81845 Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f Reviewed-by: Shawn Rutledge --- .../network/securesocketclient/certificateinfo.cpp | 2 +- examples/sql/drilldown/informationwindow.cpp | 2 +- examples/sql/masterdetail/mainwindow.cpp | 2 +- examples/widgets/desktop/systray/window.cpp | 2 +- .../itemviews/basicsortfiltermodel/window.cpp | 4 ++-- examples/widgets/layouts/dynamiclayouts/dialog.cpp | 2 +- examples/widgets/tools/regexp/regexpdialog.cpp | 2 +- .../regularexpression/regularexpressiondialog.cpp | 2 +- examples/widgets/widgets/calendarwidget/window.cpp | 20 ++++++++++---------- examples/widgets/widgets/charactermap/mainwindow.cpp | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) (limited to 'examples') diff --git a/examples/network/securesocketclient/certificateinfo.cpp b/examples/network/securesocketclient/certificateinfo.cpp index 81429fc655..9d0a674efe 100644 --- a/examples/network/securesocketclient/certificateinfo.cpp +++ b/examples/network/securesocketclient/certificateinfo.cpp @@ -57,7 +57,7 @@ CertificateInfo::CertificateInfo(QWidget *parent) form = new Ui_CertificateInfo; form->setupUi(this); - connect(form->certificationPathView, QOverload::of(&QComboBox::currentIndexChanged), + connect(form->certificationPathView, &QComboBox::currentIndexChanged, this, &CertificateInfo::updateCertificateInfo); } diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp index 0007432672..349416b553 100644 --- a/examples/sql/drilldown/informationwindow.cpp +++ b/examples/sql/drilldown/informationwindow.cpp @@ -87,7 +87,7 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *items, connect(descriptionEditor, &QTextEdit::textChanged, [=]() { enableButtons(); }); - connect(imageFileEditor, QOverload::of(&QComboBox::currentIndexChanged), [=]() { + connect(imageFileEditor, &QComboBox::currentIndexChanged, [=]() { enableButtons(); }); diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp index 2ff9a10d91..11f123372c 100644 --- a/examples/sql/masterdetail/mainwindow.cpp +++ b/examples/sql/masterdetail/mainwindow.cpp @@ -283,7 +283,7 @@ QGroupBox* MainWindow::createArtistGroupBox() artistView->setModel(model->relationModel(2)); artistView->setModelColumn(1); - connect(artistView, QOverload::of(&QComboBox::currentIndexChanged), + connect(artistView, &QComboBox::currentIndexChanged, this, &MainWindow::changeArtist); QGroupBox *box = new QGroupBox(tr("Artist")); diff --git a/examples/widgets/desktop/systray/window.cpp b/examples/widgets/desktop/systray/window.cpp index e30166beac..3238e3bf31 100644 --- a/examples/widgets/desktop/systray/window.cpp +++ b/examples/widgets/desktop/systray/window.cpp @@ -80,7 +80,7 @@ Window::Window() connect(showMessageButton, &QAbstractButton::clicked, this, &Window::showMessage); connect(showIconCheckBox, &QAbstractButton::toggled, trayIcon, &QSystemTrayIcon::setVisible); - connect(iconComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(iconComboBox, &QComboBox::currentIndexChanged, this, &Window::setIcon); connect(trayIcon, &QSystemTrayIcon::messageClicked, this, &Window::messageClicked); connect(trayIcon, &QSystemTrayIcon::activated, this, &Window::iconActivated); diff --git a/examples/widgets/itemviews/basicsortfiltermodel/window.cpp b/examples/widgets/itemviews/basicsortfiltermodel/window.cpp index b45ee47ee2..bfc9044724 100644 --- a/examples/widgets/itemviews/basicsortfiltermodel/window.cpp +++ b/examples/widgets/itemviews/basicsortfiltermodel/window.cpp @@ -89,9 +89,9 @@ Window::Window() connect(filterPatternLineEdit, &QLineEdit::textChanged, this, &Window::filterRegExpChanged); - connect(filterSyntaxComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(filterSyntaxComboBox, &QComboBox::currentIndexChanged, this, &Window::filterRegExpChanged); - connect(filterColumnComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(filterColumnComboBox, &QComboBox::currentIndexChanged, this, &Window::filterColumnChanged); connect(filterCaseSensitivityCheckBox, &QAbstractButton::toggled, this, &Window::filterRegExpChanged); diff --git a/examples/widgets/layouts/dynamiclayouts/dialog.cpp b/examples/widgets/layouts/dynamiclayouts/dialog.cpp index baf3b4cf1e..bd9baa9faf 100644 --- a/examples/widgets/layouts/dynamiclayouts/dialog.cpp +++ b/examples/widgets/layouts/dynamiclayouts/dialog.cpp @@ -155,7 +155,7 @@ void Dialog::createOptionsGroupBox() buttonsOrientationComboBox->addItem(tr("Vertical"), Qt::Vertical); connect(buttonsOrientationComboBox, - QOverload::of(&QComboBox::currentIndexChanged), + &QComboBox::currentIndexChanged, this, &Dialog::buttonsOrientationChanged); diff --git a/examples/widgets/tools/regexp/regexpdialog.cpp b/examples/widgets/tools/regexp/regexpdialog.cpp index bf61d09974..e70bb7a530 100644 --- a/examples/widgets/tools/regexp/regexpdialog.cpp +++ b/examples/widgets/tools/regexp/regexpdialog.cpp @@ -142,7 +142,7 @@ RegExpDialog::RegExpDialog(QWidget *parent) connect(caseSensitiveCheckBox, &QAbstractButton::toggled, this, &RegExpDialog::refresh); connect(minimalCheckBox, &QAbstractButton::toggled, this, &RegExpDialog::refresh); - connect(syntaxComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(syntaxComboBox, &QComboBox::currentIndexChanged, this, &RegExpDialog::refresh); patternComboBox->addItem(tr("[A-Za-z_]+([A-Za-z_0-9]*)")); diff --git a/examples/widgets/tools/regularexpression/regularexpressiondialog.cpp b/examples/widgets/tools/regularexpression/regularexpressiondialog.cpp index 2f2e2f6ea7..ff83193152 100644 --- a/examples/widgets/tools/regularexpression/regularexpressiondialog.cpp +++ b/examples/widgets/tools/regularexpression/regularexpressiondialog.cpp @@ -225,7 +225,7 @@ RegularExpressionDialog::RegularExpressionDialog(QWidget *parent) connect(offsetSpinBox, &QSpinBox::valueChanged, this, &RegularExpressionDialog::refresh); - connect(matchTypeComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(matchTypeComboBox, &QComboBox::currentIndexChanged, this, &RegularExpressionDialog::refresh); connect(anchoredMatchOptionCheckBox, &QCheckBox::toggled, this, &RegularExpressionDialog::refresh); diff --git a/examples/widgets/widgets/calendarwidget/window.cpp b/examples/widgets/widgets/calendarwidget/window.cpp index ae10223dd4..23010a6e1a 100644 --- a/examples/widgets/widgets/calendarwidget/window.cpp +++ b/examples/widgets/widgets/calendarwidget/window.cpp @@ -313,19 +313,19 @@ void Window::createGeneralOptionsGroupBox() verticalHeaderLabel->setBuddy(verticalHeaderCombo); //! [11] - connect(localeCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(localeCombo, &QComboBox::currentIndexChanged, this, &Window::localeChanged); - connect(firstDayCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(firstDayCombo, &QComboBox::currentIndexChanged, this, &Window::firstDayChanged); - connect(selectionModeCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(selectionModeCombo, &QComboBox::currentIndexChanged, this, &Window::selectionModeChanged); connect(gridCheckBox, &QCheckBox::toggled, calendar, &QCalendarWidget::setGridVisible); connect(navigationCheckBox, &QCheckBox::toggled, calendar, &QCalendarWidget::setNavigationBarVisible); - connect(horizontalHeaderCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(horizontalHeaderCombo, &QComboBox::currentIndexChanged, this, &Window::horizontalHeaderChanged); - connect(verticalHeaderCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(verticalHeaderCombo, &QComboBox::currentIndexChanged, this, &Window::verticalHeaderChanged); //! [11] @@ -446,15 +446,15 @@ void Window::createTextFormatsGroupBox() mayFirstCheckBox = new QCheckBox(tr("May &1 in red")); //! [17] //! [18] - connect(weekdayColorCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(weekdayColorCombo, &QComboBox::currentIndexChanged, this, &Window::weekdayFormatChanged); - connect(weekdayColorCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(weekdayColorCombo, &QComboBox::currentIndexChanged, this, &Window::reformatCalendarPage); - connect(weekendColorCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(weekendColorCombo, &QComboBox::currentIndexChanged, this, &Window::weekendFormatChanged); - connect(weekendColorCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(weekendColorCombo, &QComboBox::currentIndexChanged, this, &Window::reformatCalendarPage); - connect(headerTextFormatCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(headerTextFormatCombo, &QComboBox::currentIndexChanged, this, &Window::reformatHeaders); connect(firstFridayCheckBox, &QCheckBox::toggled, this, &Window::reformatCalendarPage); diff --git a/examples/widgets/widgets/charactermap/mainwindow.cpp b/examples/widgets/widgets/charactermap/mainwindow.cpp index 702b50156b..47f7001a34 100644 --- a/examples/widgets/widgets/charactermap/mainwindow.cpp +++ b/examples/widgets/widgets/charactermap/mainwindow.cpp @@ -90,7 +90,7 @@ MainWindow::MainWindow(QWidget *parent) filterCombo->addItem(tr("Monospaced"), QVariant::fromValue(QFontComboBox::MonospacedFonts)); filterCombo->addItem(tr("Proportional"), QVariant::fromValue(QFontComboBox::ProportionalFonts)); filterCombo->setCurrentIndex(0); - connect(filterCombo, QOverload::of(&QComboBox::currentIndexChanged), + connect(filterCombo, &QComboBox::currentIndexChanged, this, &MainWindow::filterChanged); QLabel *fontLabel = new QLabel(tr("Font:")); -- cgit v1.2.3