summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp')
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index bd3c6d1f03..10430e1796 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -1208,7 +1208,7 @@ void tst_QComboBox::currentIndex()
QVERIFY(testWidget->currentText().isEmpty());
// spy on currentIndexChanged
- QSignalSpy indexChangedSpy(testWidget, SIGNAL(currentIndexChanged(int, QString)));
+ QSignalSpy indexChangedInt(testWidget, SIGNAL(currentIndexChanged(int)));
// stuff items into it
foreach(QString text, initialItems) {
@@ -1232,12 +1232,12 @@ void tst_QComboBox::currentIndex()
QCOMPARE(testWidget->currentText(), expectedCurrentText);
// check that signal count is correct
- QCOMPARE(indexChangedSpy.count(), expectedSignalCount);
+ QCOMPARE(indexChangedInt.count(), expectedSignalCount);
// compare with last sent signal values
- if (indexChangedSpy.count())
- QCOMPARE(indexChangedSpy.at(indexChangedSpy.count() - 1).at(0).toInt(),
- testWidget->currentIndex());
+ if (indexChangedInt.count())
+ QCOMPARE(indexChangedInt.at(indexChangedInt.count() - 1).at(0).toInt(),
+ testWidget->currentIndex());
if (edit) {
testWidget->setCurrentIndex(-1);
@@ -2336,8 +2336,7 @@ public:
{
QStringList list;
list << "one" << "two";
- connect(this, SIGNAL(currentIndexChanged(int, QString)),
- this, SLOT(onCurrentIndexChanged(int)));
+ connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
addItems(list);
}
public slots: