summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/animation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/animation')
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp30
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp32
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp62
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp30
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp62
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp66
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp30
7 files changed, 128 insertions, 184 deletions
diff --git a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
index edf44d6677..e85fe1fae8 100644
--- a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
+++ b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
index f6d9d2c14f..52e346b2fa 100644
--- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/
@@ -137,7 +129,7 @@ private:
void tst_QAnimationGroup::emptyGroup()
{
QSequentialAnimationGroup group;
- QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy groupStateChangedSpy(&group, &QSequentialAnimationGroup::stateChanged);
QVERIFY(groupStateChangedSpy.isValid());
QCOMPARE(group.state(), QAnimationGroup::Stopped);
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index 2021eefd8f..654c345363 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/
@@ -256,10 +248,10 @@ void tst_QParallelAnimationGroup::stateChanged()
group.addAnimation(anim3);
group.addAnimation(anim4);
- QSignalSpy spy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy spy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy spy3(anim3, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy spy4(anim4, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy spy1(anim1, &TestAnimation::stateChanged);
+ QSignalSpy spy2(anim2, &TestAnimation::stateChanged);
+ QSignalSpy spy3(anim3, &TestAnimation::stateChanged);
+ QSignalSpy spy4(anim4, &TestAnimation::stateChanged);
QVERIFY(spy1.isValid());
QVERIFY(spy2.isValid());
@@ -434,8 +426,8 @@ void tst_QParallelAnimationGroup::updateChildrenWithRunningGroup()
anim.setEndValue(100);
anim.setDuration(200);
- QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy groupStateChangedSpy(&group, &QParallelAnimationGroup::stateChanged);
+ QSignalSpy childStateChangedSpy(&anim, &TestAnimation::stateChanged);
QVERIFY(groupStateChangedSpy.isValid());
QVERIFY(childStateChangedSpy.isValid());
@@ -601,8 +593,8 @@ void tst_QParallelAnimationGroup::startGroupWithRunningChild()
anim2.setEndValue(100);
anim2.setDuration(200);
- QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy stateChangedSpy1(&anim1, &TestAnimation::stateChanged);
+ QSignalSpy stateChangedSpy2(&anim2, &TestAnimation::stateChanged);
QVERIFY(stateChangedSpy1.isValid());
QVERIFY(stateChangedSpy2.isValid());
@@ -669,20 +661,20 @@ void tst_QParallelAnimationGroup::zeroDurationAnimation()
anim3.setEndValue(100);
anim3.setDuration(10);
- QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy1(&anim1, SIGNAL(finished()));
+ QSignalSpy stateChangedSpy1(&anim1, &TestAnimation::stateChanged);
+ QSignalSpy finishedSpy1(&anim1, &TestAnimation::finished);
QVERIFY(stateChangedSpy1.isValid());
QVERIFY(finishedSpy1.isValid());
- QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy2(&anim2, SIGNAL(finished()));
+ QSignalSpy stateChangedSpy2(&anim2, &TestAnimation::stateChanged);
+ QSignalSpy finishedSpy2(&anim2, &TestAnimation::finished);
QVERIFY(stateChangedSpy2.isValid());
QVERIFY(finishedSpy2.isValid());
- QSignalSpy stateChangedSpy3(&anim3, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy3(&anim3, SIGNAL(finished()));
+ QSignalSpy stateChangedSpy3(&anim3, &TestAnimation::stateChanged);
+ QSignalSpy finishedSpy3(&anim3, &TestAnimation::finished);
QVERIFY(stateChangedSpy3.isValid());
QVERIFY(finishedSpy3.isValid());
@@ -760,7 +752,7 @@ void tst_QParallelAnimationGroup::stopUncontrolledAnimations()
loopsForever.setDuration(100);
loopsForever.setLoopCount(-1);
- QSignalSpy stateChangedSpy(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy stateChangedSpy(&anim1, &TestAnimation::stateChanged);
QVERIFY(stateChangedSpy.isValid());
group.addAnimation(&anim1);
@@ -968,7 +960,7 @@ void tst_QParallelAnimationGroup::pauseResume()
{
QParallelAnimationGroup group;
TestAnimation2 *anim = new TestAnimation2(250, &group); // 0, duration = 250;
- QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy spy(anim, &TestAnimation::stateChanged);
QVERIFY(spy.isValid());
QCOMPARE(group.duration(), 250);
group.start();
diff --git a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
index 419fa1af20..a966f557f5 100644
--- a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
+++ b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
index dc731ee765..f27757d56d 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/
@@ -230,9 +222,9 @@ void tst_QPropertyAnimation::statesAndSignals()
anim = new DummyPropertyAnimation;
anim->setDuration(100);
- QSignalSpy finishedSpy(anim, SIGNAL(finished()));
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy currentLoopSpy(anim, SIGNAL(currentLoopChanged(int)));
+ QSignalSpy finishedSpy(anim, &QPropertyAnimation::finished);
+ QSignalSpy runningSpy(anim, &QPropertyAnimation::stateChanged);
+ QSignalSpy currentLoopSpy(anim, &QPropertyAnimation::currentLoopChanged);
QVERIFY(finishedSpy.isValid());
QVERIFY(runningSpy.isValid());
@@ -311,8 +303,8 @@ void tst_QPropertyAnimation::deletion1()
QPointer<QPropertyAnimation> anim = new QPropertyAnimation(object, "minimumWidth");
//test that the animation is deleted correctly depending of the deletion flag passed in start()
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QSignalSpy runningSpy(anim.data(), &QPropertyAnimation::stateChanged);
+ QSignalSpy finishedSpy(anim.data(), &QPropertyAnimation::finished);
QVERIFY(runningSpy.isValid());
QVERIFY(finishedSpy.isValid());
anim->setStartValue(10);
@@ -355,8 +347,8 @@ void tst_QPropertyAnimation::deletion2()
anim->setEndValue(20);
anim->setDuration(200);
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QSignalSpy runningSpy(anim.data(), &QPropertyAnimation::stateChanged);
+ QSignalSpy finishedSpy(anim.data(), &QPropertyAnimation::finished);
QVERIFY(runningSpy.isValid());
QVERIFY(finishedSpy.isValid());
@@ -389,8 +381,8 @@ void tst_QPropertyAnimation::deletion3()
anim->setEndValue(20);
anim->setDuration(200);
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QSignalSpy runningSpy(anim, &QPropertyAnimation::stateChanged);
+ QSignalSpy finishedSpy(anim, &QPropertyAnimation::finished);
QVERIFY(runningSpy.isValid());
QVERIFY(finishedSpy.isValid());
@@ -490,7 +482,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning()
//normal case: the animation finishes and is deleted
QPointer<QVariantAnimation> anim = new QPropertyAnimation(&o, "ole");
anim->setEndValue(100);
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy runningSpy(anim.data(), &QVariantAnimation::stateChanged);
QVERIFY(runningSpy.isValid());
anim->start(QVariantAnimation::DeleteWhenStopped);
QTest::qWait(anim->duration() + 100);
@@ -501,7 +493,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning()
{
QPointer<QVariantAnimation> anim = new QPropertyAnimation(&o, "ole");
anim->setEndValue(100);
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy runningSpy(anim.data(), &QVariantAnimation::stateChanged);
QVERIFY(runningSpy.isValid());
anim->start(QVariantAnimation::DeleteWhenStopped);
QTest::qWait(anim->duration()/2);
@@ -850,7 +842,7 @@ void tst_QPropertyAnimation::setStartEndValues()
void tst_QPropertyAnimation::zeroDurationStart()
{
DummyPropertyAnimation anim;
- QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy spy(&anim, &DummyPropertyAnimation::stateChanged);
QVERIFY(spy.isValid());
anim.setDuration(0);
QCOMPARE(anim.state(), QAbstractAnimation::Stopped);
@@ -972,7 +964,7 @@ void tst_QPropertyAnimation::operationsInStates()
o.setProperty("ole", 42);
QPropertyAnimation anim(&o, "ole");
anim.setEndValue(100);
- QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy spy(&anim, &QPropertyAnimation::stateChanged);
QVERIFY(spy.isValid());
anim.stop();
@@ -1132,7 +1124,7 @@ void tst_QPropertyAnimation::valueChanged()
QPropertyAnimation anim(&o, "ole");
anim.setEndValue(5);
anim.setDuration(1000);
- QSignalSpy spy(&anim, SIGNAL(valueChanged(QVariant)));
+ QSignalSpy spy(&anim, &QPropertyAnimation::valueChanged);
QVERIFY(spy.isValid());
anim.start();
@@ -1263,8 +1255,8 @@ void tst_QPropertyAnimation::zeroLoopCount()
anim->setDuration(20);
anim->setLoopCount(0);
- QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QSignalSpy runningSpy(anim, &QPropertyAnimation::stateChanged);
+ QSignalSpy finishedSpy(anim, &QPropertyAnimation::finished);
QVERIFY(runningSpy.isValid());
QVERIFY(finishedSpy.isValid());
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index 51f07993cd..b554fc43b7 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/
@@ -637,8 +629,8 @@ void tst_QSequentialAnimationGroup::pauseAndResume()
sequence->addAnimation(a3_s_o1);
sequence->setLoopCount(2);
- QSignalSpy a1StateChangedSpy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy a1StateChangedSpy(a1_s_o1, &QVariantAnimation::stateChanged);
+ QSignalSpy seqStateChangedSpy(sequence, &QAnimationGroup::stateChanged);
QVERIFY(a1StateChangedSpy.isValid());
QVERIFY(seqStateChangedSpy.isValid());
@@ -744,8 +736,8 @@ void tst_QSequentialAnimationGroup::restart()
{
// sequence operating on same object/property
QAnimationGroup *sequence = new QSequentialAnimationGroup();
- QSignalSpy seqCurrentAnimChangedSpy(sequence, SIGNAL(currentAnimationChanged(QAbstractAnimation*)));
- QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy seqCurrentAnimChangedSpy(static_cast<QSequentialAnimationGroup*>(sequence), &QSequentialAnimationGroup::currentAnimationChanged);
+ QSignalSpy seqStateChangedSpy(sequence, &QAnimationGroup::stateChanged);
QVERIFY(seqCurrentAnimChangedSpy.isValid());
QVERIFY(seqStateChangedSpy.isValid());
@@ -756,7 +748,7 @@ void tst_QSequentialAnimationGroup::restart()
for (int i = 0; i < 3; i++) {
anims[i] = new DummyPropertyAnimation;
anims[i]->setDuration(100);
- animsStateChanged[i] = new QSignalSpy(anims[i], SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ animsStateChanged[i] = new QSignalSpy(anims[i], &QVariantAnimation::stateChanged);
QVERIFY(animsStateChanged[i]->isValid());
}
@@ -816,10 +808,10 @@ void tst_QSequentialAnimationGroup::looping()
QAbstractAnimation *a2_s_o1 = new DummyPropertyAnimation;
QAbstractAnimation *a3_s_o1 = new DummyPropertyAnimation;
- QSignalSpy a1Spy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy a2Spy(a2_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy a3Spy(a3_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy seqSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy a1Spy(a1_s_o1, &QAbstractAnimation::stateChanged);
+ QSignalSpy a2Spy(a2_s_o1, &QAbstractAnimation::stateChanged);
+ QSignalSpy a3Spy(a3_s_o1, &QAbstractAnimation::stateChanged);
+ QSignalSpy seqSpy(sequence, &QSequentialAnimationGroup::stateChanged);
QVERIFY(a1Spy.isValid());
QVERIFY(a2Spy.isValid());
@@ -833,7 +825,7 @@ void tst_QSequentialAnimationGroup::looping()
sequence->setLoopCount(2);
QSequentialAnimationGroup group;
- QSignalSpy groupSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy groupSpy(&group, &QSequentialAnimationGroup::stateChanged);
QVERIFY(groupSpy.isValid());
group.addAnimation(sequence);
@@ -1101,8 +1093,8 @@ void tst_QSequentialAnimationGroup::updateChildrenWithRunningGroup()
anim.setEndValue(100);
anim.setDuration(200);
- QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy groupStateChangedSpy(&group, &QSequentialAnimationGroup::stateChanged);
+ QSignalSpy childStateChangedSpy(&anim, &TestAnimation::stateChanged);
QVERIFY(groupStateChangedSpy.isValid());
QVERIFY(childStateChangedSpy.isValid());
@@ -1268,8 +1260,8 @@ void tst_QSequentialAnimationGroup::startGroupWithRunningChild()
anim2->setEndValue(100);
anim2->setDuration(200);
- QSignalSpy stateChangedSpy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
- QSignalSpy stateChangedSpy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy stateChangedSpy1(anim1, &TestAnimation::stateChanged);
+ QSignalSpy stateChangedSpy2(anim2, &TestAnimation::stateChanged);
QVERIFY(stateChangedSpy1.isValid());
QVERIFY(stateChangedSpy2.isValid());
@@ -1345,7 +1337,7 @@ void tst_QSequentialAnimationGroup::zeroDurationAnimation()
anim3->setEndValue(100);
anim3->setDuration(0);
- QSignalSpy stateChangedSpy(anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy stateChangedSpy(anim1, &TestAnimation::stateChanged);
QVERIFY(stateChangedSpy.isValid());
group.addAnimation(anim1);
@@ -1417,7 +1409,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
//first we test a group with one uncontrolled animation
QSequentialAnimationGroup group;
UncontrolledAnimation notTimeDriven(&o1, &group);
- QSignalSpy spy(&group, SIGNAL(finished()));
+ QSignalSpy spy(&group, &QSequentialAnimationGroup::finished);
QVERIFY(spy.isValid());
group.start();
@@ -1437,7 +1429,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
// lets make sure the seeking will work again
spy.clear();
DummyPropertyAnimation anim(&group);
- QSignalSpy animStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy animStateChangedSpy(&anim, &DummyPropertyAnimation::stateChanged);
QVERIFY(animStateChangedSpy.isValid());
group.setCurrentTime(300);
@@ -1639,7 +1631,7 @@ void tst_QSequentialAnimationGroup::pauseResume()
QPropertyAnimation *anim = new QPropertyAnimation(&dummy, "foo", &group);
anim->setDuration(250);
anim->setEndValue(250);
- QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+ QSignalSpy spy(anim, &QPropertyAnimation::stateChanged);
QVERIFY(spy.isValid());
QCOMPARE(group.duration(), 250);
group.start();
diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
index bd9ba2e75f..d8e2cf6beb 100644
--- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
+++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite 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$
**
****************************************************************************/