summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp')
-rw-r--r--tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp47
1 files changed, 10 insertions, 37 deletions
diff --git a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp
index a6825b0b9..a77c56aa1 100644
--- a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp
+++ b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QtTest>
#include <QtCore/QThread>
@@ -100,8 +75,7 @@ void tst_QHelpIndexModel::setupIndex()
h.setReadOnly(false);
QHelpIndexModel *m = h.indexModel();
SignalWaiter w;
- connect(m, SIGNAL(indexCreated()),
- &w, SLOT(stopWaiting()));
+ connect(m, &QHelpIndexModel::indexCreated, &w, &SignalWaiter::stopWaiting);
w.start();
h.setupData();
int i = 0;
@@ -109,7 +83,7 @@ void tst_QHelpIndexModel::setupIndex()
QTest::qWait(500);
QCOMPARE(h.currentFilter(), QString("unfiltered"));
- QCOMPARE(m->stringList().count(), 19);
+ QCOMPARE(m->stringList().size(), 19);
w.start();
h.setCurrentFilter("Custom Filter 1");
@@ -120,7 +94,7 @@ void tst_QHelpIndexModel::setupIndex()
QStringList lst;
lst << "foo" << "bar" << "bla" << "einstein" << "newton";
const auto stringList = m->stringList();
- QCOMPARE(stringList.count(), 5);
+ QCOMPARE(stringList.size(), 5);
for (const QString &s : stringList)
lst.removeAll(s);
QCOMPARE(lst.isEmpty(), true);
@@ -132,8 +106,7 @@ void tst_QHelpIndexModel::filter()
h.setReadOnly(false);
QHelpIndexModel *m = h.indexModel();
SignalWaiter w;
- connect(m, SIGNAL(indexCreated()),
- &w, SLOT(stopWaiting()));
+ connect(m, &QHelpIndexModel::indexCreated, &w, &SignalWaiter::stopWaiting);
w.start();
h.setupData();
int i = 0;
@@ -141,16 +114,16 @@ void tst_QHelpIndexModel::filter()
QTest::qWait(500);
QCOMPARE(h.currentFilter(), QString("unfiltered"));
- QCOMPARE(m->stringList().count(), 19);
+ QCOMPARE(m->stringList().size(), 19);
m->filter("foo");
- QCOMPARE(m->stringList().count(), 2);
+ QCOMPARE(m->stringList().size(), 2);
m->filter("fo");
- QCOMPARE(m->stringList().count(), 3);
+ QCOMPARE(m->stringList().size(), 3);
m->filter("qmake");
- QCOMPARE(m->stringList().count(), 11);
+ QCOMPARE(m->stringList().size(), 11);
}
QTEST_MAIN(tst_QHelpIndexModel)