diff options
Diffstat (limited to 'tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp')
-rw-r--r-- | tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp | 64 |
1 files changed, 28 insertions, 36 deletions
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp index ea0a14c18c..8c895dc214 100644 --- a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp @@ -5,36 +5,28 @@ ** ** This file is part of the QtGui module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -163,10 +155,10 @@ void tst_QIdentityProxyModel::insertRows() verifyIdentity(m_model); - QSignalSpy modelBeforeSpy(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int))); - QSignalSpy modelAfterSpy(m_model, SIGNAL(rowsInserted(QModelIndex,int,int))); - QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int))); - QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); + QSignalSpy modelBeforeSpy(m_model, &QStandardItemModel::rowsAboutToBeInserted); + QSignalSpy modelAfterSpy(m_model, &QStandardItemModel::rowsInserted); + QSignalSpy proxyBeforeSpy(m_proxy, &QStandardItemModel::rowsAboutToBeInserted); + QSignalSpy proxyAfterSpy(m_proxy, &QStandardItemModel::rowsInserted); QVERIFY(modelBeforeSpy.isValid()); QVERIFY(modelAfterSpy.isValid()); @@ -203,10 +195,10 @@ void tst_QIdentityProxyModel::removeRows() verifyIdentity(m_model); - QSignalSpy modelBeforeSpy(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); - QSignalSpy modelAfterSpy(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int))); - QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); - QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(rowsRemoved(QModelIndex,int,int))); + QSignalSpy modelBeforeSpy(m_model, &QStandardItemModel::rowsAboutToBeRemoved); + QSignalSpy modelAfterSpy(m_model, &QStandardItemModel::rowsRemoved); + QSignalSpy proxyBeforeSpy(m_proxy, &QStandardItemModel::rowsAboutToBeRemoved); + QSignalSpy proxyAfterSpy(m_proxy, &QStandardItemModel::rowsRemoved); QVERIFY(modelBeforeSpy.isValid()); QVERIFY(modelAfterSpy.isValid()); @@ -257,10 +249,10 @@ void tst_QIdentityProxyModel::moveRows() verifyIdentity(&model); - QSignalSpy modelBeforeSpy(&model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); - QSignalSpy modelAfterSpy(&model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); - QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); - QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy modelBeforeSpy(&model, &DynamicTreeModel::rowsAboutToBeMoved); + QSignalSpy modelAfterSpy(&model, &DynamicTreeModel::rowsMoved); + QSignalSpy proxyBeforeSpy(m_proxy, &QIdentityProxyModel::rowsAboutToBeMoved); + QSignalSpy proxyAfterSpy(m_proxy, &QIdentityProxyModel::rowsMoved); QVERIFY(modelBeforeSpy.isValid()); QVERIFY(modelAfterSpy.isValid()); @@ -318,10 +310,10 @@ void tst_QIdentityProxyModel::reset() verifyIdentity(&model); - QSignalSpy modelBeforeSpy(&model, SIGNAL(modelAboutToBeReset())); - QSignalSpy modelAfterSpy(&model, SIGNAL(modelReset())); - QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(modelAboutToBeReset())); - QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(modelReset())); + QSignalSpy modelBeforeSpy(&model, &DynamicTreeModel::modelAboutToBeReset); + QSignalSpy modelAfterSpy(&model, &DynamicTreeModel::modelReset); + QSignalSpy proxyBeforeSpy(m_proxy, &QIdentityProxyModel::modelAboutToBeReset); + QSignalSpy proxyAfterSpy(m_proxy, &QIdentityProxyModel::modelReset); QVERIFY(modelBeforeSpy.isValid()); QVERIFY(modelAfterSpy.isValid()); @@ -351,8 +343,8 @@ void tst_QIdentityProxyModel::dataChanged() verifyIdentity(&model); - QSignalSpy modelSpy(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>))); - QSignalSpy proxySpy(m_proxy, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>))); + QSignalSpy modelSpy(&model, &DataChangedModel::dataChanged); + QSignalSpy proxySpy(m_proxy, &QIdentityProxyModel::dataChanged); QVERIFY(modelSpy.isValid()); QVERIFY(proxySpy.isValid()); |