diff options
author | Vitaly Fanaskov <[email protected]> | 2020-02-04 15:31:25 +0100 |
---|---|---|
committer | Vitaly Fanaskov <[email protected]> | 2020-02-10 18:28:45 +0100 |
commit | 9cc8949cc63e47da3db333a699ff55ffa811783b (patch) | |
tree | f21de429bd5a1abcac784fb9e0e3c34f1e8e2fa0 | |
parent | f19fbbdb2f5a3dbf3bac7cdbb4f7e8efe34f1e0d (diff) |
QComboBox: remove deprecated signals
The following signals have been removed:
- void activated(const QString &);
- void highlighted(const QString &);
Task-number: QTBUG-81845
Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Christian Ehrlicher <[email protected]>
23 files changed, 40 insertions, 77 deletions
diff --git a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp index 9fa24fcd17b..2f1d9a330c2 100644 --- a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp +++ b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp @@ -67,7 +67,7 @@ EmbeddedDialog::EmbeddedDialog(QWidget *parent) ui->style->setCurrentIndex(ui->style->count() - 1); } - connect(ui->layoutDirection, QOverload<int>::of(&QComboBox::activated), + connect(ui->layoutDirection, &QComboBox::activated, this, &EmbeddedDialog::layoutDirectionChanged); connect(ui->spacing, &QSlider::valueChanged, this, &EmbeddedDialog::spacingChanged); diff --git a/examples/widgets/painting/basicdrawing/window.cpp b/examples/widgets/painting/basicdrawing/window.cpp index 65f6971d134..c3f05dd9486 100644 --- a/examples/widgets/painting/basicdrawing/window.cpp +++ b/examples/widgets/painting/basicdrawing/window.cpp @@ -157,17 +157,17 @@ Window::Window() //! [7] //! [8] - connect(shapeComboBox, QOverload<int>::of(&QComboBox::activated), + connect(shapeComboBox, &QComboBox::activated, this, &Window::shapeChanged); connect(penWidthSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &Window::penChanged); - connect(penStyleComboBox, QOverload<int>::of(&QComboBox::activated), + connect(penStyleComboBox, &QComboBox::activated, this, &Window::penChanged); - connect(penCapComboBox, QOverload<int>::of(&QComboBox::activated), + connect(penCapComboBox, &QComboBox::activated, this, &Window::penChanged); - connect(penJoinComboBox, QOverload<int>::of(&QComboBox::activated), + connect(penJoinComboBox, &QComboBox::activated, this, &Window::penChanged); - connect(brushStyleComboBox, QOverload<int>::of(&QComboBox::activated), + connect(brushStyleComboBox, &QComboBox::activated, this, &Window::brushChanged); connect(antialiasingCheckBox, &QAbstractButton::toggled, renderArea, &RenderArea::setAntialiased); diff --git a/examples/widgets/painting/imagecomposition/imagecomposer.cpp b/examples/widgets/painting/imagecomposition/imagecomposer.cpp index ffdc8f433c7..f0935147cfd 100644 --- a/examples/widgets/painting/imagecomposition/imagecomposer.cpp +++ b/examples/widgets/painting/imagecomposition/imagecomposer.cpp @@ -102,7 +102,7 @@ ImageComposer::ImageComposer() //! [3] connect(sourceButton, &QAbstractButton::clicked, this, &ImageComposer::chooseSource); - connect(operatorComboBox, QOverload<int>::of(&QComboBox::activated), + connect(operatorComboBox, &QComboBox::activated, this, &ImageComposer::recalculateResult); connect(destinationButton, &QAbstractButton::clicked, this, &ImageComposer::chooseDestination); diff --git a/examples/widgets/painting/painterpaths/window.cpp b/examples/widgets/painting/painterpaths/window.cpp index 6fb32183139..e43a0377af9 100644 --- a/examples/widgets/painting/painterpaths/window.cpp +++ b/examples/widgets/painting/painterpaths/window.cpp @@ -194,13 +194,13 @@ Window::Window() //! [12] //! [16] - connect(fillRuleComboBox, QOverload<int>::of(&QComboBox::activated), + connect(fillRuleComboBox, &QComboBox::activated, this, &Window::fillRuleChanged); - connect(fillColor1ComboBox, QOverload<int>::of(&QComboBox::activated), + connect(fillColor1ComboBox, &QComboBox::activated, this, &Window::fillGradientChanged); - connect(fillColor2ComboBox, QOverload<int>::of(&QComboBox::activated), + connect(fillColor2ComboBox, &QComboBox::activated, this, &Window::fillGradientChanged); - connect(penColorComboBox, QOverload<int>::of(&QComboBox::activated), + connect(penColorComboBox, &QComboBox::activated, this, &Window::penColorChanged); for (RenderArea *area : qAsConst(renderAreas)) { diff --git a/examples/widgets/painting/transformations/window.cpp b/examples/widgets/painting/transformations/window.cpp index 8261c4e12e3..a07e4dd5d1f 100644 --- a/examples/widgets/painting/transformations/window.cpp +++ b/examples/widgets/painting/transformations/window.cpp @@ -79,7 +79,7 @@ Window::Window() operationComboBoxes[i]->addItem(tr("Scale to 75%")); operationComboBoxes[i]->addItem(tr("Translate by (50, 50)")); - connect(operationComboBoxes[i], QOverload<int>::of(&QComboBox::activated), + connect(operationComboBoxes[i], &QComboBox::activated, this, &Window::operationChanged); layout->addWidget(transformedRenderAreas[i], 0, i + 1); @@ -159,7 +159,7 @@ void Window::setupShapes() shapes.append(text); shapes.append(truck); - connect(shapeComboBox, QOverload<int>::of(&QComboBox::activated), + connect(shapeComboBox, &QComboBox::activated, this, &Window::shapeSelected); } //! [7] diff --git a/examples/widgets/richtext/calendar/mainwindow.cpp b/examples/widgets/richtext/calendar/mainwindow.cpp index 3ddb1cf7ade..0842faeb16e 100644 --- a/examples/widgets/richtext/calendar/mainwindow.cpp +++ b/examples/widgets/richtext/calendar/mainwindow.cpp @@ -86,7 +86,7 @@ MainWindow::MainWindow() //! [2] //! [3] - connect(monthCombo, QOverload<int>::of(&QComboBox::activated), + connect(monthCombo, &QComboBox::activated, this, &MainWindow::setMonth); connect(yearEdit, &QDateTimeEdit::dateChanged, this, &MainWindow::setYear); diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 85fb83ab893..efeaf75cc56 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -389,7 +389,7 @@ void TextEdit::setupTextActions() comboStyle->addItem("Heading 5"); comboStyle->addItem("Heading 6"); - connect(comboStyle, QOverload<int>::of(&QComboBox::activated), this, &TextEdit::textStyle); + connect(comboStyle, &QComboBox::activated, this, &TextEdit::textStyle); comboFont = new QFontComboBox(tb); tb->addWidget(comboFont); diff --git a/examples/widgets/tools/codecs/previewform.cpp b/examples/widgets/tools/codecs/previewform.cpp index f48651335a1..80a99bf271e 100644 --- a/examples/widgets/tools/codecs/previewform.cpp +++ b/examples/widgets/tools/codecs/previewform.cpp @@ -167,7 +167,7 @@ PreviewForm::PreviewForm(QWidget *parent) new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); okButton = buttonBox->button(QDialogButtonBox::Ok); - connect(encodingComboBox, QOverload<int>::of(&QComboBox::activated), + connect(encodingComboBox, &QComboBox::activated, this, &PreviewForm::updateTextEdit); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); diff --git a/examples/widgets/tools/completer/mainwindow.cpp b/examples/widgets/tools/completer/mainwindow.cpp index b50e0a54564..14ad73847e3 100644 --- a/examples/widgets/tools/completer/mainwindow.cpp +++ b/examples/widgets/tools/completer/mainwindow.cpp @@ -117,11 +117,11 @@ MainWindow::MainWindow(QWidget *parent) contentsLabel = new QLabel; contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(modelCombo, QOverload<int>::of(&QComboBox::activated), + connect(modelCombo, &QComboBox::activated, this, &MainWindow::changeModel); - connect(modeCombo, QOverload<int>::of(&QComboBox::activated), + connect(modeCombo, &QComboBox::activated, this, &MainWindow::changeMode); - connect(caseCombo, QOverload<int>::of(&QComboBox::activated), + connect(caseCombo, &QComboBox::activated, this, &MainWindow::changeCase); connect(maxVisibleSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &MainWindow::changeMaxVisible); diff --git a/examples/widgets/tools/settingseditor/locationdialog.cpp b/examples/widgets/tools/settingseditor/locationdialog.cpp index 99c9834a63e..86119a1afda 100644 --- a/examples/widgets/tools/settingseditor/locationdialog.cpp +++ b/examples/widgets/tools/settingseditor/locationdialog.cpp @@ -115,9 +115,9 @@ LocationDialog::LocationDialog(QWidget *parent) buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - connect(formatComboBox, QOverload<int>::of(&QComboBox::activated), + connect(formatComboBox, &QComboBox::activated, this, &LocationDialog::updateLocationsTable); - connect(scopeComboBox, QOverload<int>::of(&QComboBox::activated), + connect(scopeComboBox, &QComboBox::activated, this, &LocationDialog::updateLocationsTable); connect(organizationComboBox->lineEdit(), &QLineEdit::editingFinished, @@ -125,7 +125,7 @@ LocationDialog::LocationDialog(QWidget *parent) connect(applicationComboBox->lineEdit(), &QLineEdit::editingFinished, this, &LocationDialog::updateLocationsTable); - connect(applicationComboBox, QOverload<int>::of(&QComboBox::activated), + connect(applicationComboBox, &QComboBox::activated, this, &LocationDialog::updateLocationsTable); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); diff --git a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp index 302ccc436c2..3305ac90325 100644 --- a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp +++ b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp @@ -126,9 +126,9 @@ MainWindow::MainWindow(QWidget *parent) //! [1] //! [2] - connect(modeCombo, QOverload<int>::of(&QComboBox::activated), + connect(modeCombo, &QComboBox::activated, this, &MainWindow::changeMode); - connect(caseCombo, QOverload<int>::of(&QComboBox::activated), + connect(caseCombo, &QComboBox::activated, this, &MainWindow::changeMode); lineEdit = new QLineEdit; diff --git a/examples/widgets/widgets/icons/imagedelegate.cpp b/examples/widgets/widgets/icons/imagedelegate.cpp index 4fd251aa1bf..9f1e19c9eb7 100644 --- a/examples/widgets/widgets/icons/imagedelegate.cpp +++ b/examples/widgets/widgets/icons/imagedelegate.cpp @@ -70,7 +70,7 @@ QWidget *ImageDelegate::createEditor(QWidget *parent, else if (index.column() == 2) comboBox->addItems(IconPreviewArea::iconStateNames()); - connect(comboBox, QOverload<int>::of(&QComboBox::activated), + connect(comboBox, &QComboBox::activated, this, &ImageDelegate::emitCommitData); return comboBox; diff --git a/examples/widgets/widgets/lineedits/window.cpp b/examples/widgets/widgets/lineedits/window.cpp index bb9396411a6..765f867deb7 100644 --- a/examples/widgets/widgets/lineedits/window.cpp +++ b/examples/widgets/widgets/lineedits/window.cpp @@ -127,15 +127,15 @@ Window::Window(QWidget *parent) //! [4] //! [5] - connect(echoComboBox, QOverload<int>::of(&QComboBox::activated), + connect(echoComboBox, &QComboBox::activated, this, &Window::echoChanged); - connect(validatorComboBox, QOverload<int>::of(&QComboBox::activated), + connect(validatorComboBox, &QComboBox::activated, this, &Window::validatorChanged); - connect(alignmentComboBox, QOverload<int>::of(&QComboBox::activated), + connect(alignmentComboBox, &QComboBox::activated, this, &Window::alignmentChanged); - connect(inputMaskComboBox, QOverload<int>::of(&QComboBox::activated), + connect(inputMaskComboBox, &QComboBox::activated, this, &Window::inputMaskChanged); - connect(accessComboBox, QOverload<int>::of(&QComboBox::activated), + connect(accessComboBox, &QComboBox::activated, this, &Window::accessChanged); //! [5] diff --git a/examples/widgets/widgets/sliders/window.cpp b/examples/widgets/widgets/sliders/window.cpp index 4a28a61f3d0..948e545850d 100644 --- a/examples/widgets/widgets/sliders/window.cpp +++ b/examples/widgets/widgets/sliders/window.cpp @@ -126,7 +126,7 @@ void Window::createControls(const QString &title) orientationCombo->addItem(tr("Vertical slider-like widgets")); //! [6] //! [7] - connect(orientationCombo, QOverload<int>::of(&QComboBox::activated), + connect(orientationCombo, &QComboBox::activated, //! [7] //! [8] stackedWidget, &QStackedWidget::setCurrentIndex); connect(minimumSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), diff --git a/examples/widgets/widgets/validators/validatorwidget.cpp b/examples/widgets/widgets/validators/validatorwidget.cpp index 9ddd6409248..625441d7c55 100644 --- a/examples/widgets/widgets/validators/validatorwidget.cpp +++ b/examples/widgets/widgets/validators/validatorwidget.cpp @@ -77,7 +77,7 @@ ValidatorWidget::ValidatorWidget(QWidget *parent) this, &ValidatorWidget::updateDoubleValidator); connect(doubleDecimals, QOverload<int>::of(&QSpinBox::valueChanged), this, &ValidatorWidget::updateDoubleValidator); - connect(doubleFormat, QOverload<int>::of(&QComboBox::activated), + connect(doubleFormat, &QComboBox::activated, this, &ValidatorWidget::updateDoubleValidator); connect(doubleEditor, &QLineEdit::editingFinished, doubleLedWidget, &LEDWidget::flash); diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp index 78e5b8d1ef9..bd4aa962b7e 100644 --- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp @@ -274,7 +274,7 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent) initUnits(); initPagesPerSheet(); - connect(m_ui.unitCombo, QOverload<int>::of(&QComboBox::activated), this, &QPageSetupWidget::unitChanged); + connect(m_ui.unitCombo, &QComboBox::activated, this, &QPageSetupWidget::unitChanged); connect(m_ui.pageSizeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pageSizeChanged); connect(m_ui.pageWidth, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged); diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 6b82669f074..044401ac13c 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3108,7 +3108,7 @@ void QFileDialogPrivate::createWidgets() QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject())); qFileDialogUi->lookInCombo->setFileDialogPrivate(this); - QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(activated(QString)), q, SLOT(_q_goToDirectory(QString))); + QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(textActivated(QString)), q, SLOT(_q_goToDirectory(QString))); qFileDialogUi->lookInCombo->setInsertPolicy(QComboBox::NoInsert); qFileDialogUi->lookInCombo->setDuplicatesEnabled(false); @@ -3138,7 +3138,7 @@ void QFileDialogPrivate::createWidgets() qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)), q, SLOT(_q_useNameFilter(int))); - QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)), + QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(textActivated(QString)), q, SIGNAL(filterSelected(QString))); qFileDialogUi->listView->setFileDialogPrivate(this); diff --git a/src/widgets/doc/snippets/qstackedlayout/main.cpp b/src/widgets/doc/snippets/qstackedlayout/main.cpp index 9c61939deef..181eed87db8 100644 --- a/src/widgets/doc/snippets/qstackedlayout/main.cpp +++ b/src/widgets/doc/snippets/qstackedlayout/main.cpp @@ -74,7 +74,7 @@ Widget::Widget(QWidget *parent) pageComboBox->addItem(tr("Page 1")); pageComboBox->addItem(tr("Page 2")); pageComboBox->addItem(tr("Page 3")); - connect(pageComboBox, QOverload<int>::of(&QComboBox::activated), + connect(pageComboBox, &QComboBox::activated, stackedLayout, &QStackedLayout::setCurrentIndex); //! [1] diff --git a/src/widgets/doc/snippets/qstackedwidget/main.cpp b/src/widgets/doc/snippets/qstackedwidget/main.cpp index 077c2818306..c68a9923328 100644 --- a/src/widgets/doc/snippets/qstackedwidget/main.cpp +++ b/src/widgets/doc/snippets/qstackedwidget/main.cpp @@ -74,7 +74,7 @@ Widget::Widget(QWidget *parent) pageComboBox->addItem(tr("Page 1")); pageComboBox->addItem(tr("Page 2")); pageComboBox->addItem(tr("Page 3")); - connect(pageComboBox, QOverload<int>::of(&QComboBox::activated), + connect(pageComboBox, &QComboBox::activated, stackedWidget, &QStackedWidget::setCurrentIndex); //! [1] //! [2] diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 9789004473a..b249608ccc4 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -905,20 +905,9 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const The item's \a index is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged(). - */ /*! - \fn void QComboBox::activated(const QString &text) - - This signal is sent when the user chooses an item in the combobox. - The item's \a text is passed. Note that this signal is sent even - when the choice is not changed. If you need to know when the - choice actually changes, use signal currentIndexChanged(). - - \obsolete Use QComboBox::textActivated() instead -*/ -/*! \fn void QComboBox::textActivated(const QString &text) \since 5.14 @@ -936,14 +925,6 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const */ /*! - \fn void QComboBox::highlighted(const QString &text) - - This signal is sent when an item in the combobox popup list is - highlighted by the user. The item's \a text is passed. - - \obsolete Use textHighlighted() instead -*/ -/*! \fn void QComboBox::textHighlighted(const QString &text) \since 5.14 @@ -1424,12 +1405,6 @@ void QComboBoxPrivate::emitActivated(const QModelIndex &index) QString text(itemText(index)); emit q->activated(index.row()); emit q->textActivated(text); -#if QT_DEPRECATED_SINCE(5, 15) -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - emit q->activated(text); -QT_WARNING_POP -#endif } void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index) @@ -1440,12 +1415,6 @@ void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index) QString text(itemText(index)); emit q->highlighted(index.row()); emit q->textHighlighted(text); -#if QT_DEPRECATED_SINCE(5, 15) -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - emit q->highlighted(text); -QT_WARNING_POP -#endif } void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index) diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h index 1b80f90c747..19bdf39233e 100644 --- a/src/widgets/widgets/qcombobox.h +++ b/src/widgets/widgets/qcombobox.h @@ -233,12 +233,6 @@ Q_SIGNALS: void currentIndexChanged(int index); void currentIndexChanged(const QString &); void currentTextChanged(const QString &); -#if QT_DEPRECATED_SINCE(5, 15) - QT_DEPRECATED_VERSION_X(5, 15, "Use textActivated() instead") - void activated(const QString &); - QT_DEPRECATED_VERSION_X(5, 15, "Use textHighlighted() instead") - void highlighted(const QString &); -#endif protected: void focusInEvent(QFocusEvent *e) override; diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp index 89c4a747390..fe3e3c7f723 100644 --- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp @@ -1807,7 +1807,7 @@ void tst_QCompleter::QTBUG_52028_tabAutoCompletes() QApplication::setActiveWindow(&w); QVERIFY(QTest::qWaitForWindowActive(&w)); - QSignalSpy activatedSpy(&cbox, QOverload<int>::of(&QComboBox::activated)); + QSignalSpy activatedSpy(&cbox, &QComboBox::activated); // Tab key will complete but not activate cbox.lineEdit()->clear(); @@ -1851,7 +1851,7 @@ void tst_QCompleter::QTBUG_51889_activatedSentTwice() QApplication::setActiveWindow(&w); QVERIFY(QTest::qWaitForWindowActive(&w)); - QSignalSpy activatedSpy(&cbox, QOverload<int>::of(&QComboBox::activated)); + QSignalSpy activatedSpy(&cbox, &QComboBox::activated); // Navigate + enter activates only once (first item) cbox.lineEdit()->clear(); diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 3878e7ccb20..1f301fd60f0 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -2484,7 +2484,7 @@ void tst_QComboBox::task247863_keyBoardSelection() QApplication::setActiveWindow(&combo); QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo)); - QSignalSpy spy(&combo, SIGNAL(activated(QString))); + QSignalSpy spy(&combo, &QComboBox::activated); qApp->setEffectEnabled(Qt::UI_AnimateCombo, false); QTest::keyClick(&combo, Qt::Key_Space); qApp->setEffectEnabled(Qt::UI_AnimateCombo, true); |