summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-12 05:34:21 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-12 05:34:21 (GMT)
commit05c1b075f757afcc87748ac6758277eb5c0d8e17 (patch)
tree9f3159998e643ccd96313c94fb5eac2782aa3aab /tests
parent87845845cd5b44bc4ad391ad5ae8499f3850acb3 (diff)
parentdb3ae6188c8f88f25b4f8e2645e76a7c6fffef18 (diff)
downloadQt-05c1b075f757afcc87748ac6758277eb5c0d8e17.zip
Qt-05c1b075f757afcc87748ac6758277eb5c0d8e17.tar.gz
Qt-05c1b075f757afcc87748ac6758277eb5c0d8e17.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests')
-rw-r--r--tests/arthur/common/paintcommands.cpp16
-rw-r--r--tests/arthur/common/paintcommands.h2
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp39
-rw-r--r--tests/auto/declarative/declarative.pro1
-rw-r--r--tests/auto/declarative/qmldom/tst_qmldom.cpp120
-rw-r--r--tests/auto/declarative/qmleasefollow/data/easefollow1.qml3
-rw-r--r--tests/auto/declarative/qmleasefollow/data/easefollow2.qml5
-rw-r--r--tests/auto/declarative/qmleasefollow/data/easefollow3.qml6
-rw-r--r--tests/auto/declarative/qmleasefollow/qmleasefollow.pro8
-rw-r--r--tests/auto/declarative/qmleasefollow/tst_qmleasefollow.cpp122
-rw-r--r--tests/auto/declarative/qmlecmascript/data/scriptErrors.qml7
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp20
-rw-r--r--tests/auto/declarative/qmllanguage/qmllanguage.pro9
-rw-r--r--tests/auto/declarative/qmllanguage/testtypes.cpp1
-rw-r--r--tests/auto/declarative/qmllanguage/testtypes.h12
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp32
-rw-r--r--tests/auto/declarative/states/data/explicit.qml14
-rw-r--r--tests/auto/declarative/states/data/parentChange4.qml30
-rw-r--r--tests/auto/declarative/states/data/parentChange5.qml30
-rw-r--r--tests/auto/declarative/states/data/restoreEntryValues.qml14
-rw-r--r--tests/auto/declarative/states/tst_states.cpp82
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml2
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.pngbin814 -> 813 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml98
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.0.pngbin0 -> 1305 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.1.pngbin0 -> 1306 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.2.pngbin0 -> 1305 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.3.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.4.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.5.pngbin0 -> 1305 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.6.pngbin0 -> 1306 bytes
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/data/easefollow.qml1807
-rw-r--r--tests/auto/declarative/visual/qmleasefollow/easefollow.qml40
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp17
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before22
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result25
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp5
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result6
-rw-r--r--tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp6
-rw-r--r--tests/auto/qaudioformat/tst_qaudioformat.cpp15
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp14
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp18
-rw-r--r--tests/auto/qdatastream/tst_qdatastream.cpp2
-rw-r--r--tests/auto/qfile/tst_qfile.cpp166
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp9
-rw-r--r--tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp50
-rw-r--r--tests/auto/qimage/tst_qimage.cpp24
-rw-r--r--tests/auto/qimagewriter/tst_qimagewriter.cpp2
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/qlcdnumber/tst_qlcdnumber.cpp16
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp10
-rw-r--r--tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp39
-rw-r--r--tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp18
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp479
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp18
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp6
-rw-r--r--tests/auto/qregexp/tst_qregexp.cpp28
-rw-r--r--tests/auto/qregion/tst_qregion.cpp20
-rw-r--r--tests/auto/qscopedpointer/tst_qscopedpointer.cpp131
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp2
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp10
-rw-r--r--tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp530
69 files changed, 3514 insertions, 749 deletions
diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp
index 44deb0e..feabaed 100644
--- a/tests/arthur/common/paintcommands.cpp
+++ b/tests/arthur/common/paintcommands.cpp
@@ -587,10 +587,10 @@ void PaintCommands::staticInit()
"^image_setColor\\s+([\\w.:\\/]*)\\s+([0-9]*)\\s+#([0-9]*)$",
"image_setColor <imageName> <index> <color>",
"image_setColor myImage 0 black");
- DECL_PAINTCOMMAND("image_setNumColors", command_image_setNumColors,
- "^image_setNumColors\\s+([\\w.:\\/]*)\\s+([0-9]*)$",
- "image_setNumColors <imageName> <nbColors>",
- "image_setNumColors myImage 128");
+ DECL_PAINTCOMMAND("image_setColorCount", command_image_setColorCount,
+ "^image_setColorCount\\s+([\\w.:\\/]*)\\s+([0-9]*)$",
+ "image_setColorCount <imageName> <nbColors>",
+ "image_setColorCount myImage 128");
DECL_PAINTCOMMANDSECTION("transformations");
DECL_PAINTCOMMAND("resetMatrix", command_resetMatrix,
@@ -2245,7 +2245,7 @@ void PaintCommands::command_image_load(QRegExp re)
}
/***************************************************************************************************/
-void PaintCommands::command_image_setNumColors(QRegExp re)
+void PaintCommands::command_image_setColorCount(QRegExp re)
{
QStringList caps = re.capturedTexts();
@@ -2253,10 +2253,10 @@ void PaintCommands::command_image_setNumColors(QRegExp re)
int count = convertToInt(caps.at(2));
if (m_verboseMode)
- printf(" -(lance) image_setNumColors(%s), %d -> %d\n",
- qPrintable(name), m_imageMap[name].numColors(), count);
+ printf(" -(lance) image_setColorCount(%s), %d -> %d\n",
+ qPrintable(name), m_imageMap[name].colorCount(), count);
- m_imageMap[name].setNumColors(count);
+ m_imageMap[name].setColorCount(count);
}
/***************************************************************************************************/
diff --git a/tests/arthur/common/paintcommands.h b/tests/arthur/common/paintcommands.h
index ba91a92..e2c4d67 100644
--- a/tests/arthur/common/paintcommands.h
+++ b/tests/arthur/common/paintcommands.h
@@ -239,7 +239,7 @@ private:
void command_image_convertToFormat(QRegExp re);
void command_image_load(QRegExp re);
void command_image_setColor(QRegExp re);
- void command_image_setNumColors(QRegExp re);
+ void command_image_setColorCount(QRegExp re);
// commands: transformation
void command_resetMatrix(QRegExp re);
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 1ec4c16..46f26f8 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -135,6 +135,7 @@ SUBDIRS += \
qfocusevent \
qfocusframe \
qfont \
+ qfontcombobox \
qfontdatabase \
qfontdialog \
qfontmetrics \
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index 74d5f46..2692cb6 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -53,6 +53,7 @@ public:
tst_animations() {}
private slots:
+ void simpleProperty();
void simpleNumber();
void simpleColor();
void alwaysRunToEnd();
@@ -73,7 +74,31 @@ private slots:
} \
QCOMPARE(lhs, rhs); \
} while (false)
-
+
+void tst_animations::simpleProperty()
+{
+ QmlGraphicsRectangle rect;
+ QmlPropertyAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("pos");
+ animation.setTo(QPointF(200,200));
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "pos");
+ QVERIFY(animation.to().toPointF() == QPointF(200,200));
+ animation.start();
+ QVERIFY(animation.isRunning());
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.pos(), QPointF(200,200));
+
+ rect.setPos(0,0);
+ animation.start();
+ animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+ animation.setCurrentTime(125);
+ QCOMPARE(rect.pos(), QPointF(100,100));
+}
+
void tst_animations::simpleNumber()
{
QmlGraphicsRectangle rect;
@@ -81,13 +106,19 @@ void tst_animations::simpleNumber()
animation.setTarget(&rect);
animation.setProperty("x");
animation.setTo(200);
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "x");
+ QVERIFY(animation.to() == 200);
animation.start();
+ QVERIFY(animation.isRunning());
QTest::qWait(animation.duration());
QTIMED_COMPARE(rect.x(), qreal(200));
rect.setX(0);
animation.start();
animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
animation.setCurrentTime(125);
QCOMPARE(rect.x(), qreal(100));
}
@@ -99,13 +130,19 @@ void tst_animations::simpleColor()
animation.setTarget(&rect);
animation.setProperty("color");
animation.setTo(QColor("red"));
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "color");
+ QVERIFY(animation.to() == QColor("red"));
animation.start();
+ QVERIFY(animation.isRunning());
QTest::qWait(animation.duration());
QTIMED_COMPARE(rect.color(), QColor("red"));
rect.setColor(QColor("blue"));
animation.start();
animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
animation.setCurrentTime(125);
QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
}
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 1d08d92..bcf908d 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -16,6 +16,7 @@ SUBDIRS += \
qmlconnection \ # Cover
qmlcontext \ # Cover
qmldom \ # Cover
+ qmleasefollow \ # Cover
qmlecmascript \ # Cover
qmlerror \ # Cover
qmlfontloader \ # Cover
diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp
index f219581..9e1a2a8 100644
--- a/tests/auto/declarative/qmldom/tst_qmldom.cpp
+++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp
@@ -73,6 +73,7 @@ private slots:
void object_url();
void copy();
+ void position();
private:
QmlEngine engine;
};
@@ -1188,6 +1189,125 @@ void tst_qmldom::copy()
}
}
+// Tests the position/length of various elements
+void tst_qmldom::position()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ /*14*/ "Item {\n"
+ /*21*/ " id: myItem\n"
+ /*36*/ " property int a: 10\n"
+ /*59*/ " x: 10\n"
+ /*69*/ " y: x + 10\n"
+ /*83*/ " z: NumberAnimation {}\n"
+ /*109*/ " opacity: Behavior {}\n"
+ /*134*/ " Component {\n"
+ /*150*/ " Item{}\n"
+ /*165*/ " }\n"
+ /*171*/ " children: [ Item{}, Item{} ]\n"
+ /*204*/ "}\n";
+
+
+ QmlDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QmlDomObject root = document.rootObject();
+
+ // All QmlDomDynamicProperty
+ QmlDomDynamicProperty dynProp = root.dynamicProperty("a");
+ QCOMPARE(dynProp.position(), 40);
+ QCOMPARE(dynProp.length(), 18);
+
+ // All QmlDomProperty
+ QmlDomProperty x = root.property("x");
+ QCOMPARE(x.position(), 63);
+ QCOMPARE(x.length(), 1);
+
+ QmlDomProperty y = root.property("y");
+ QCOMPARE(y.position(), 73);
+ QCOMPARE(y.length(), 1);
+
+ QmlDomProperty z = root.property("z");
+ QCOMPARE(z.position(), 87);
+ QCOMPARE(z.length(), 1);
+
+ QmlDomProperty opacity = root.property("opacity");
+ QCOMPARE(opacity.position(), 113);
+ QCOMPARE(opacity.length(), 7);
+
+ QmlDomProperty data = root.property("data");
+ QCOMPARE(data.position(), 138);
+ QCOMPARE(data.length(), 0);
+
+ QmlDomProperty children = root.property("children");
+ QCOMPARE(children.position(), 175);
+ QCOMPARE(children.length(), 8);
+
+ QmlDomList dataList = data.value().toList();
+ QCOMPARE(dataList.values().count(), 1);
+ QmlDomList childrenList = children.value().toList();
+ QCOMPARE(childrenList.values().count(), 2);
+
+ // All QmlDomObject
+ QCOMPARE(root.position(), 14);
+ QCOMPARE(root.length(), 191);
+
+ QmlDomObject numberAnimation = z.value().toValueSource().object();
+ QCOMPARE(numberAnimation.position(), 90);
+ QCOMPARE(numberAnimation.length(), 18);
+
+ QmlDomObject behavior = opacity.value().toValueInterceptor().object();
+ QCOMPARE(behavior.position(), 122);
+ QCOMPARE(behavior.length(), 11);
+
+ QmlDomObject component = dataList.values().at(0).toObject();
+ QCOMPARE(component.position(), 138);
+ QCOMPARE(component.length(), 32);
+
+ QmlDomObject componentRoot = component.toComponent().componentRoot();
+ QCOMPARE(componentRoot.position(), 158);
+ QCOMPARE(componentRoot.length(), 6);
+
+ QmlDomObject child1 = childrenList.values().at(0).toObject();
+ QCOMPARE(child1.position(), 187);
+ QCOMPARE(child1.length(), 6);
+
+ QmlDomObject child2 = childrenList.values().at(1).toObject();
+ QCOMPARE(child2.position(), 195);
+ QCOMPARE(child2.length(), 6);
+
+ // All QmlDomValue
+ QmlDomValue xValue = x.value();
+ QCOMPARE(xValue.position(), 66);
+ QCOMPARE(xValue.length(), 2);
+
+ QmlDomValue yValue = y.value();
+ QCOMPARE(yValue.position(), 76);
+ QCOMPARE(yValue.length(), 6);
+
+ QmlDomValue zValue = z.value();
+ QCOMPARE(zValue.position(), 90);
+ QCOMPARE(zValue.length(), 18);
+
+ QmlDomValue opacityValue = opacity.value();
+ QCOMPARE(opacityValue.position(), 122);
+ QCOMPARE(opacityValue.length(), 11);
+
+ QmlDomValue dataValue = data.value();
+ QCOMPARE(dataValue.position(), 138);
+ QCOMPARE(dataValue.length(), 32);
+
+ QmlDomValue child1Value = childrenList.values().at(0);
+ QCOMPARE(child1Value.position(), 187);
+ QCOMPARE(child1Value.length(), 6);
+
+ QmlDomValue child2Value = childrenList.values().at(1);
+ QCOMPARE(child2Value.position(), 195);
+ QCOMPARE(child2Value.length(), 6);
+
+ // All QmlDomList
+ qWarning("QmlListValue position test required");
+}
+
QTEST_MAIN(tst_qmldom)
#include "tst_qmldom.moc"
diff --git a/tests/auto/declarative/qmleasefollow/data/easefollow1.qml b/tests/auto/declarative/qmleasefollow/data/easefollow1.qml
new file mode 100644
index 0000000..0cc19eb
--- /dev/null
+++ b/tests/auto/declarative/qmleasefollow/data/easefollow1.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+EaseFollow {}
diff --git a/tests/auto/declarative/qmleasefollow/data/easefollow2.qml b/tests/auto/declarative/qmleasefollow/data/easefollow2.qml
new file mode 100644
index 0000000..b65964e
--- /dev/null
+++ b/tests/auto/declarative/qmleasefollow/data/easefollow2.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+EaseFollow {
+ source: 10; duration: 300; enabled: true; reversingMode: EaseFollow.Immediate
+}
diff --git a/tests/auto/declarative/qmleasefollow/data/easefollow3.qml b/tests/auto/declarative/qmleasefollow/data/easefollow3.qml
new file mode 100644
index 0000000..f8886e9
--- /dev/null
+++ b/tests/auto/declarative/qmleasefollow/data/easefollow3.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+EaseFollow {
+ source: 10; velocity: 250; enabled: false; reversingMode: EaseFollow.Sync
+ maximumEasingTime: 150
+}
diff --git a/tests/auto/declarative/qmleasefollow/qmleasefollow.pro b/tests/auto/declarative/qmleasefollow/qmleasefollow.pro
new file mode 100644
index 0000000..4224a7e
--- /dev/null
+++ b/tests/auto/declarative/qmleasefollow/qmleasefollow.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qmleasefollow.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qmleasefollow/tst_qmleasefollow.cpp b/tests/auto/declarative/qmleasefollow/tst_qmleasefollow.cpp
new file mode 100644
index 0000000..2e2050e
--- /dev/null
+++ b/tests/auto/declarative/qmleasefollow/tst_qmleasefollow.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qmlengine.h>
+#include <QtDeclarative/qmlcomponent.h>
+#include <private/qmleasefollow_p.h>
+#include <private/qmlvaluetype_p.h>
+#include "../../../shared/util.h"
+
+class tst_qmleasefollow : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qmleasefollow();
+
+private slots:
+ void defaultValues();
+ void values();
+ void disabled();
+
+private:
+ QmlEngine engine;
+};
+
+tst_qmleasefollow::tst_qmleasefollow()
+{
+}
+
+void tst_qmleasefollow::defaultValues()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/easefollow1.qml"));
+ QmlEaseFollow *obj = qobject_cast<QmlEaseFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 0.);
+ QCOMPARE(obj->velocity(), 200.);
+ QCOMPARE(obj->enabled(), true);
+ QCOMPARE(obj->duration(), -1.);
+ QCOMPARE(obj->maximumEasingTime(), -1.);
+ QCOMPARE(obj->reversingMode(), QmlEaseFollow::Eased);
+
+ delete obj;
+}
+
+void tst_qmleasefollow::values()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/easefollow2.qml"));
+ QmlEaseFollow *obj = qobject_cast<QmlEaseFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 10.);
+ QCOMPARE(obj->velocity(), 200.);
+ QCOMPARE(obj->enabled(), true);
+ QCOMPARE(obj->duration(), 300.);
+ QCOMPARE(obj->maximumEasingTime(), -1.);
+ QCOMPARE(obj->reversingMode(), QmlEaseFollow::Immediate);
+
+ delete obj;
+}
+
+void tst_qmleasefollow::disabled()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/easefollow3.qml"));
+ QmlEaseFollow *obj = qobject_cast<QmlEaseFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 10.);
+ QCOMPARE(obj->velocity(), 250.);
+ QCOMPARE(obj->enabled(), false);
+ QCOMPARE(obj->maximumEasingTime(), 150.);
+ QCOMPARE(obj->reversingMode(), QmlEaseFollow::Sync);
+
+ delete obj;
+}
+
+QTEST_MAIN(tst_qmleasefollow)
+
+#include "tst_qmleasefollow.moc"
diff --git a/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml b/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml
index d39b312..ff22990 100644
--- a/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml
+++ b/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml
@@ -4,9 +4,12 @@ MyQmlObject {
Script { source: "scriptErrors.js" }
Script { function getValue() { a = 10; return 0; } }
- property int x: a.value
- property int y: getValue();
+ property int t: a.value
+ property int w: getValue();
+ property int x: undefinedObject
+ property int y: (a.value, undefinedObject)
onBasicSignal: { print(a.value); }
+
}
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index 220f589..983ddd0 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -480,6 +480,12 @@ void tst_qmlecmascript::enums()
// Non-existant enums
{
QmlComponent component(&engine, TEST_FILE("enums.2.qml"));
+
+ QString warning1 = component.url().toString() + ":5: Unable to assign [undefined] to int";
+ QString warning2 = component.url().toString() + ":6: Unable to assign [undefined] to int";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
QCOMPARE(object->property("a").toInt(), 0);
@@ -586,6 +592,10 @@ Tests for a regression where this used to crash.
void tst_qmlecmascript::nonExistantAttachedObject()
{
QmlComponent component(&engine, TEST_FILE("nonExistantAttachedObject.qml"));
+
+ QString warning = component.url().toString() + ":4: Unable to assign [undefined] to QString";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
+
QObject *object = component.create();
QVERIFY(object != 0);
}
@@ -683,6 +693,10 @@ Tests that only methods of Script {} blocks are exposed.
void tst_qmlecmascript::scriptAccess()
{
QmlComponent component(&engine, TEST_FILE("scriptAccess.qml"));
+
+ QString warning = component.url().toString() + ":16: Unable to assign [undefined] to int";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -811,11 +825,15 @@ void tst_qmlecmascript::scriptErrors()
QString warning1 = url.left(url.length() - 3) + "js:2: Error: Invalid write to global property \"a\"";
QString warning2 = url + ":7: TypeError: Result of expression 'a' [undefined] is not an object.";
QString warning3 = url + ":5: Error: Invalid write to global property \"a\"";
- QString warning4 = url + ":10: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning4 = url + ":12: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning5 = url + ":10: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning6 = url + ":9: Unable to assign [undefined] to int";
QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData());
QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData());
QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData());
+ QTest::ignoreMessage(QtWarningMsg, warning5.toLatin1().constData());
+ QTest::ignoreMessage(QtWarningMsg, warning6.toLatin1().constData());
MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
QVERIFY(object != 0);
diff --git a/tests/auto/declarative/qmllanguage/qmllanguage.pro b/tests/auto/declarative/qmllanguage/qmllanguage.pro
index e45d73a..d1876ef 100644
--- a/tests/auto/declarative/qmllanguage/qmllanguage.pro
+++ b/tests/auto/declarative/qmllanguage/qmllanguage.pro
@@ -1,11 +1,14 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
-QT += script
+QT += script network
macx:CONFIG -= app_bundle
SOURCES += tst_qmllanguage.cpp \
testtypes.cpp
HEADERS += testtypes.h
-# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
-# LIBS += -lgcov
+INCLUDEPATH += ../shared/
+HEADERS += ../shared/testhttpserver.h
+SOURCES += ../shared/testhttpserver.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qmllanguage/testtypes.cpp b/tests/auto/declarative/qmllanguage/testtypes.cpp
index c370c09..933431d 100644
--- a/tests/auto/declarative/qmllanguage/testtypes.cpp
+++ b/tests/auto/declarative/qmllanguage/testtypes.cpp
@@ -47,4 +47,5 @@ QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer);
QML_DEFINE_TYPE(Test,1,0,MyPropertyValueSource,MyPropertyValueSource);
QML_DEFINE_TYPE(Test,1,0,MyDotPropertyObject,MyDotPropertyObject);
QML_DEFINE_TYPE(Test,1,0,MyNamespacedType,MyNamespace::MyNamespacedType);
+QML_DEFINE_TYPE(Test,1,0,MySecondNamespacedType,MyNamespace::MySecondNamespacedType);
QML_DEFINE_NOCREATE_TYPE(MyGroupedObject);
diff --git a/tests/auto/declarative/qmllanguage/testtypes.h b/tests/auto/declarative/qmllanguage/testtypes.h
index b251f87..3598d68 100644
--- a/tests/auto/declarative/qmllanguage/testtypes.h
+++ b/tests/auto/declarative/qmllanguage/testtypes.h
@@ -535,7 +535,19 @@ namespace MyNamespace {
{
Q_OBJECT
};
+
+ class MySecondNamespacedType : public QObject
+ {
+ Q_OBJECT
+ Q_PROPERTY(QmlList<MyNamespace::MyNamespacedType *> *list READ list);
+ public:
+ QmlList<MyNamespacedType *> *list() { return &m_list; }
+
+ private:
+ QmlConcreteList<MyNamespacedType *> m_list;
+ };
}
QML_DECLARE_TYPE(MyNamespace::MyNamespacedType);
+QML_DECLARE_TYPE(MyNamespace::MySecondNamespacedType);
#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
index c23bb2d..d5c5c4d 100644
--- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
+++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
@@ -49,7 +49,6 @@
#include "testtypes.h"
#include "../../../shared/util.h"
-#include "../../network-settings.h"
/*
This test case covers QML language issues. This covers everything that does
@@ -694,11 +693,22 @@ void tst_qmllanguage::valueTypes()
void tst_qmllanguage::cppnamespace()
{
- QmlComponent component(&engine, TEST_FILE("cppnamespace.qml"));
- VERIFY_ERRORS(0);
- QObject *object = component.create();
- QVERIFY(object != 0);
- delete object;
+ {
+ QmlComponent component(&engine, TEST_FILE("cppnamespace.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("cppnamespace.2.qml"));
+ qWarning() << component.errors();
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ delete object;
+ }
}
void tst_qmllanguage::aliasProperties()
@@ -1070,19 +1080,23 @@ void tst_qmllanguage::importsRemote_data()
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
- QString serverdir = "http://"
- + QtNetworkSettings::serverName()
- + "/qtest/declarative/qmllanguage";
+ QString serverdir = "http://127.0.0.1:14445/qtest/declarative/qmllanguage";
QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QmlGraphicsRectangle";
QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QmlGraphicsText";
QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QmlGraphicsImage";
}
+#include "testhttpserver.h"
+
void tst_qmllanguage::importsRemote()
{
QFETCH(QString, qml);
QFETCH(QString, type);
+
+ TestHTTPServer server(14445);
+ server.serveDirectory(SRCDIR);
+
testType(qml,type);
}
diff --git a/tests/auto/declarative/states/data/explicit.qml b/tests/auto/declarative/states/data/explicit.qml
new file mode 100644
index 0000000..271115a
--- /dev/null
+++ b/tests/auto/declarative/states/data/explicit.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+Rectangle {
+ id: MyRectangle
+ property color sourceColor: "blue"
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges {
+ target: MyRectangle; explicit: true
+ color: sourceColor
+ }
+ }
+}
diff --git a/tests/auto/declarative/states/data/parentChange4.qml b/tests/auto/declarative/states/data/parentChange4.qml
new file mode 100644
index 0000000..ee75176
--- /dev/null
+++ b/tests/auto/declarative/states/data/parentChange4.qml
@@ -0,0 +1,30 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5; y: 5
+ width: 100; height: 100
+ color: "red"
+ }
+ MouseRegion {
+ id: Clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ id: newParent
+ transform: Scale { xScale: .5; yScale: .7}
+ }
+
+ states: State {
+ name: "reparented"
+ when: Clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/states/data/parentChange5.qml b/tests/auto/declarative/states/data/parentChange5.qml
new file mode 100644
index 0000000..47b733b
--- /dev/null
+++ b/tests/auto/declarative/states/data/parentChange5.qml
@@ -0,0 +1,30 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5; y: 5
+ width: 100; height: 100
+ color: "red"
+ }
+ MouseRegion {
+ id: Clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ id: newParent
+ transform: Rotation { angle: 30; axis { x: 0; y: 1; z: 0 } }
+ }
+
+ states: State {
+ name: "reparented"
+ when: Clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/states/data/restoreEntryValues.qml b/tests/auto/declarative/states/data/restoreEntryValues.qml
new file mode 100644
index 0000000..d86f033
--- /dev/null
+++ b/tests/auto/declarative/states/data/restoreEntryValues.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+Rectangle {
+ id: MyRectangle
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges {
+ target: MyRectangle
+ restoreEntryValues: false
+ color: "blue"
+ }
+ }
+}
diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp
index 40e9aa8..3d8f303 100644
--- a/tests/auto/declarative/states/tst_states.cpp
+++ b/tests/auto/declarative/states/tst_states.cpp
@@ -56,8 +56,11 @@ private slots:
void signalOverride();
void signalOverrideCrash();
void parentChange();
+ void parentChangeErrors();
void anchorChanges();
void script();
+ void restoreEntryValues();
+ void explicitChanges();
};
void tst_states::basicChanges()
@@ -425,6 +428,43 @@ void tst_states::parentChange()
}
}
+void tst_states::parentChangeErrors()
+{
+ QmlEngine engine;
+
+ {
+ QmlComponent rectComponent(&engine, SRCDIR "/data/parentChange4.qml");
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QmlGraphicsRectangle *innerRect = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, "QML QmlParentChange (file://" SRCDIR "/data/parentChange4.qml:25:9) Unable to preserve appearance under non-uniform scale");
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(0));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(5));
+ QCOMPARE(innerRect->y(), qreal(5));
+ }
+
+ {
+ QmlComponent rectComponent(&engine, SRCDIR "/data/parentChange5.qml");
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QmlGraphicsRectangle *innerRect = qobject_cast<QmlGraphicsRectangle*>(rect->findChild<QmlGraphicsRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, "QML QmlParentChange (file://" SRCDIR "/data/parentChange5.qml:25:9) Unable to preserve appearance under complex transform");
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(0));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(5));
+ QCOMPARE(innerRect->y(), qreal(5));
+ }
+}
+
void tst_states::anchorChanges()
{
QmlEngine engine;
@@ -479,6 +519,48 @@ void tst_states::script()
}
}
+void tst_states::restoreEntryValues()
+{
+ QmlEngine engine;
+
+ QmlComponent rectComponent(&engine, SRCDIR "/data/restoreEntryValues.qml");
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("blue"));
+}
+
+void tst_states::explicitChanges()
+{
+ QmlEngine engine;
+
+ QmlComponent rectComponent(&engine, SRCDIR "/data/explicit.qml");
+ QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setProperty("sourceColor", QColor("green"));
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->setProperty("sourceColor", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("yellow"));
+}
+
QTEST_MAIN(tst_states)
#include "tst_states.moc"
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml
index eabba73..1afd4cd 100644
--- a/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml
+++ b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml
@@ -17,7 +17,7 @@ Rectangle {
name: "hello"
PropertyChanges {
target: MyRectangle
- x: 100
+ x: 50 + 50
}
PropertyChanges {
target: MyMouseRegion
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png
index bba04a9..2ddde86 100644
--- a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml
index a90f99e..8297c5a 100644
--- a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml
@@ -1230,19 +1230,19 @@ VisualTest {
}
Frame {
msec: 4400
- hash: "8006ceaa02d22b5fdfeab400d39a0caf"
+ hash: "6f48d1a9977b77cafd38a5903017605b"
}
Frame {
msec: 4416
- hash: "6f48d1a9977b77cafd38a5903017605b"
+ hash: "69058485ced6bc992a1a7c5ee34add4c"
}
Frame {
msec: 4432
- hash: "69058485ced6bc992a1a7c5ee34add4c"
+ hash: "dafcce427161a70c3513841ac22aea00"
}
Frame {
msec: 4448
- hash: "dafcce427161a70c3513841ac22aea00"
+ hash: "3223ed179c828fadb3eca9c6373176c1"
}
Mouse {
type: 2
@@ -1254,27 +1254,27 @@ VisualTest {
}
Frame {
msec: 4464
- hash: "3223ed179c828fadb3eca9c6373176c1"
+ hash: "b08811b237ce7a460c80d285f04d53d8"
}
Frame {
msec: 4480
- hash: "b08811b237ce7a460c80d285f04d53d8"
+ hash: "fcae0317f81a3ddd713f4db1349a9da0"
}
Frame {
msec: 4496
- hash: "fcae0317f81a3ddd713f4db1349a9da0"
+ hash: "772396bb23c713f34ea5c23bfbcb115e"
}
Frame {
msec: 4512
- hash: "772396bb23c713f34ea5c23bfbcb115e"
+ hash: "ecda10356cca33901c2acd0a702fee46"
}
Frame {
msec: 4528
- hash: "ecda10356cca33901c2acd0a702fee46"
+ hash: "575d30ac088448b01f49082519bbb3a1"
}
Frame {
msec: 4544
- hash: "575d30ac088448b01f49082519bbb3a1"
+ hash: "abc2ec0bc7a93e75b5823310e6284db1"
}
Mouse {
type: 3
@@ -1286,27 +1286,27 @@ VisualTest {
}
Frame {
msec: 4560
- hash: "575d30ac088448b01f49082519bbb3a1"
+ hash: "abc2ec0bc7a93e75b5823310e6284db1"
}
Frame {
msec: 4576
- hash: "d9af30557f99b086bb1a185a946b580d"
+ hash: "575d30ac088448b01f49082519bbb3a1"
}
Frame {
msec: 4592
- hash: "82363265ed2b611a54f8d48b2af22f11"
+ hash: "ecda10356cca33901c2acd0a702fee46"
}
Frame {
msec: 4608
- hash: "f9deee3a204c939562b896a6179743d2"
+ hash: "772396bb23c713f34ea5c23bfbcb115e"
}
Frame {
msec: 4624
- hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f"
+ hash: "fcae0317f81a3ddd713f4db1349a9da0"
}
Frame {
msec: 4640
- hash: "56c72b5da44bd5efdc47c3b9c3eac409"
+ hash: "b08811b237ce7a460c80d285f04d53d8"
}
Mouse {
type: 4
@@ -1318,27 +1318,27 @@ VisualTest {
}
Frame {
msec: 4656
- hash: "72731478d80f024076ea639b55152360"
+ hash: "17c46242c17983478f34cb49cb91ca6e"
}
Frame {
msec: 4672
- hash: "4279c814163af3bd069ce21b3cd1c729"
+ hash: "dafcce427161a70c3513841ac22aea00"
}
Frame {
msec: 4688
- hash: "72a0c017a2fa90a4aeadfa6e552ff573"
+ hash: "69058485ced6bc992a1a7c5ee34add4c"
}
Frame {
msec: 4704
- hash: "391ad7ff2362e059f6170dfe306f94a7"
+ hash: "6f48d1a9977b77cafd38a5903017605b"
}
Frame {
msec: 4720
- hash: "0b0c6419e1e5b016d9c22bd98fd452b1"
+ hash: "ddb65481469c38f2331546ee03a44206"
}
Frame {
msec: 4736
- hash: "365c824c330398d267ea52ae9468b9ee"
+ hash: "a21aa1984f068650cce2a124a82c12be"
}
Mouse {
type: 3
@@ -1350,15 +1350,15 @@ VisualTest {
}
Frame {
msec: 4752
- hash: "365c824c330398d267ea52ae9468b9ee"
+ hash: "a21aa1984f068650cce2a124a82c12be"
}
Frame {
msec: 4768
- hash: "365c824c330398d267ea52ae9468b9ee"
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
}
Frame {
msec: 4784
- hash: "ddb65481469c38f2331546ee03a44206"
+ hash: "6f48d1a9977b77cafd38a5903017605b"
}
Frame {
msec: 4800
@@ -1366,7 +1366,7 @@ VisualTest {
}
Frame {
msec: 4816
- hash: "69058485ced6bc992a1a7c5ee34add4c"
+ hash: "56125a260a79bc38bb0ef44fd65ba49b"
}
Mouse {
type: 2
@@ -1378,31 +1378,31 @@ VisualTest {
}
Frame {
msec: 4832
- hash: "dafcce427161a70c3513841ac22aea00"
+ hash: "56c72b5da44bd5efdc47c3b9c3eac409"
}
Frame {
msec: 4848
- hash: "3223ed179c828fadb3eca9c6373176c1"
+ hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f"
}
Frame {
msec: 4864
- hash: "b08811b237ce7a460c80d285f04d53d8"
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
}
Frame {
msec: 4880
- hash: "f9deee3a204c939562b896a6179743d2"
+ hash: "9413dffb7ee853ba0125ac22ab22abbd"
}
Frame {
msec: 4896
- hash: "9413dffb7ee853ba0125ac22ab22abbd"
+ hash: "527b1f9e7a222483134675a73f9cf5b7"
}
Frame {
msec: 4912
- hash: "5fae0bdc65c609cb766ce585b8c649db"
+ hash: "ffeb3db6d3f177acf6f92049359a9025"
}
Frame {
msec: 4928
- hash: "ffeb3db6d3f177acf6f92049359a9025"
+ hash: "a39c80859a7643c9879da9c77b644703"
}
Mouse {
type: 3
@@ -1414,63 +1414,63 @@ VisualTest {
}
Frame {
msec: 4944
- hash: "ffeb3db6d3f177acf6f92049359a9025"
+ hash: "a39c80859a7643c9879da9c77b644703"
}
Frame {
msec: 4960
- hash: "527b1f9e7a222483134675a73f9cf5b7"
+ hash: "ffeb3db6d3f177acf6f92049359a9025"
}
Frame {
msec: 4976
- hash: "5edaad77f334e6a01982ee89a733b1f8"
+ hash: "527b1f9e7a222483134675a73f9cf5b7"
}
Frame {
msec: 4992
- hash: "6a74d6dc91a8b370200d3765c55c1136"
+ hash: "9413dffb7ee853ba0125ac22ab22abbd"
}
Frame {
msec: 5008
- hash: "4f41101378a104e72228eeb4ba395ca8"
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
}
Frame {
msec: 5024
- hash: "37739777a5979f3ebf85e47e63341660"
+ hash: "4f41101378a104e72228eeb4ba395ca8"
}
Frame {
msec: 5040
- hash: "f4fe2cc93d65e086ba8ded1438269eb2"
+ hash: "56c72b5da44bd5efdc47c3b9c3eac409"
}
Frame {
msec: 5056
- hash: "d245b288eb3eb7067c25f4475c47d2f7"
+ hash: "72731478d80f024076ea639b55152360"
}
Frame {
msec: 5072
- hash: "7f465a99fca50503736e470a0b4e1c7a"
+ hash: "07f751ea4cf877ba72fbb36f9da268d7"
}
Frame {
msec: 5088
- hash: "1d5cd86ab732da3705a7bb1deab77923"
+ hash: "a2cebc35e5c2c709a2cd83e1df6eaeab"
}
Frame {
msec: 5104
- hash: "ddb65481469c38f2331546ee03a44206"
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
}
Frame {
msec: 5120
- hash: "a21aa1984f068650cce2a124a82c12be"
+ hash: "f9f74a2e38b52c9266f33e428b6acd9d"
}
Frame {
msec: 5136
- hash: "65ad7e0189c096792331bd1bb0daf0db"
+ hash: "a93f930ec8528f954cd4a770c9a8171b"
}
Frame {
msec: 5152
- hash: "48eb78c29227a399f9c1c95c7d77c9d9"
+ hash: "bfa51b7c19753ef7b16d78afffc7b9dd"
}
Frame {
msec: 5168
- hash: "51f228440001d23e294da1dde07a1577"
+ hash: "df62027b6b53c69a071cb3dc09c3a7ed"
}
Frame {
msec: 5184
@@ -1611,7 +1611,7 @@ VisualTest {
Key {
type: 6
key: 16777249
- modifiers: 67108864
+ modifiers: 0
text: ""
autorep: false
count: 1
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.0.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.0.png
new file mode 100644
index 0000000..21b6afb
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.1.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.1.png
new file mode 100644
index 0000000..bb8a02b
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.2.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.2.png
new file mode 100644
index 0000000..da60237
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.3.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.3.png
new file mode 100644
index 0000000..3e943e8
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.4.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.4.png
new file mode 100644
index 0000000..4fbaf26
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.5.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.5.png
new file mode 100644
index 0000000..c10d196
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.6.png b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.6.png
new file mode 100644
index 0000000..a672c06
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qmleasefollow/data/easefollow.qml b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.qml
new file mode 100644
index 0000000..029a2fc
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/data/easefollow.qml
@@ -0,0 +1,1807 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "1f60efdb8704b92c9361daa468a25391"
+ }
+ Frame {
+ msec: 32
+ hash: "3bb6a87617e0e5d4922e573eec975886"
+ }
+ Frame {
+ msec: 48
+ hash: "268941737e6324d580890b151de621fb"
+ }
+ Frame {
+ msec: 64
+ hash: "99c674eccc082d7f0982257a748d93e5"
+ }
+ Frame {
+ msec: 80
+ hash: "2970467e8262c8a3f0b11be71245d048"
+ }
+ Frame {
+ msec: 96
+ hash: "63cbd06d6bb035d27c18dba49238d8b2"
+ }
+ Frame {
+ msec: 112
+ hash: "49f77bb3d323f882c0ec56e1f1040b3a"
+ }
+ Frame {
+ msec: 128
+ hash: "40263c5f9b5d2236536163785f832b4d"
+ }
+ Frame {
+ msec: 144
+ hash: "dc63b1c21a2027c4beb9c297a3677fbd"
+ }
+ Frame {
+ msec: 160
+ hash: "4fab52ea29a819fec032f19dbcbef012"
+ }
+ Frame {
+ msec: 176
+ hash: "60b48407a8f8ae2cce7d3e7c8b21991c"
+ }
+ Frame {
+ msec: 192
+ hash: "6e542c681092a5ebeef0534fa2bd2d6c"
+ }
+ Frame {
+ msec: 208
+ hash: "c7c6471969bbf81efdb86d1695548fc6"
+ }
+ Frame {
+ msec: 224
+ hash: "b7f4ad9a49feb400894209c02b94478a"
+ }
+ Frame {
+ msec: 240
+ hash: "3eb58b2f5233aead976183c13f241113"
+ }
+ Frame {
+ msec: 256
+ hash: "54f2036c50c6d8079fc0cadc01385980"
+ }
+ Frame {
+ msec: 272
+ hash: "f297659d75f6e724d72bd548821f4c9f"
+ }
+ Frame {
+ msec: 288
+ hash: "112798f080336fc9c603a7e9097dd8aa"
+ }
+ Frame {
+ msec: 304
+ hash: "c432e6ec2b53ca43cb7a7325d0cc379b"
+ }
+ Frame {
+ msec: 320
+ hash: "4a6d3db3efd665ad7f372bf3f2508ed7"
+ }
+ Frame {
+ msec: 336
+ hash: "0befa5dc4d2cc196fed0eb1a3aa75b8f"
+ }
+ Frame {
+ msec: 352
+ hash: "a34d010b50d59c362b54e44d69c2df91"
+ }
+ Frame {
+ msec: 368
+ hash: "cbdacced50186c87066ce1d46548b27e"
+ }
+ Frame {
+ msec: 384
+ hash: "a4060010ae4d3c0973bda48d68f7bd0a"
+ }
+ Frame {
+ msec: 400
+ hash: "47353437da587f732f986004c09884d0"
+ }
+ Frame {
+ msec: 416
+ hash: "080c348145167bbec671a04da6f7564f"
+ }
+ Frame {
+ msec: 432
+ hash: "69dead737c717a076ae3865680341fb4"
+ }
+ Frame {
+ msec: 448
+ hash: "1efdc31c5c8fa72fc848877deb6caaa4"
+ }
+ Frame {
+ msec: 464
+ hash: "28d7da1e933d0585d03acf4a529e7b42"
+ }
+ Frame {
+ msec: 480
+ hash: "bf85534124bf025b7ede0d6c80b8e443"
+ }
+ Frame {
+ msec: 496
+ hash: "cdbeb2d51541b1b1eff060efe993db91"
+ }
+ Frame {
+ msec: 512
+ hash: "52ad56ae16c8ab523adda8edc512dd87"
+ }
+ Frame {
+ msec: 528
+ hash: "61b1937f4c8dd2cb0ddd7031c5bfb3ab"
+ }
+ Frame {
+ msec: 544
+ hash: "1b109baba71b16827f90da654af093a3"
+ }
+ Frame {
+ msec: 560
+ hash: "d56621362802c8626868f36ba1e7db22"
+ }
+ Frame {
+ msec: 576
+ hash: "ee5555ec3ad8760f43bbf5958a925936"
+ }
+ Frame {
+ msec: 592
+ hash: "1ed2831144a453af1978605c0e42d17c"
+ }
+ Frame {
+ msec: 608
+ hash: "c74d5cdb3395a702269dfa88c8c9d975"
+ }
+ Frame {
+ msec: 624
+ hash: "ea98ddd9588cc23fd82a342ec2925ba8"
+ }
+ Frame {
+ msec: 640
+ hash: "e76b94d6d57f1a510f7649eaab892562"
+ }
+ Frame {
+ msec: 656
+ hash: "022f40b6fe9dbaf8019855234acb3461"
+ }
+ Frame {
+ msec: 672
+ hash: "467da4f48aa6aeb113f0797facf157e8"
+ }
+ Frame {
+ msec: 688
+ hash: "8df407aadd4d896eb6537e1555a0242f"
+ }
+ Frame {
+ msec: 704
+ hash: "122e4671881e31f54e617729f4fbb3b0"
+ }
+ Frame {
+ msec: 720
+ hash: "562718f101c3cd7525b890076413df5e"
+ }
+ Frame {
+ msec: 736
+ hash: "07feae99ecf4b70eb094fd3e10deca56"
+ }
+ Frame {
+ msec: 752
+ hash: "0980d133b1006cc07796023880415163"
+ }
+ Frame {
+ msec: 768
+ hash: "7112b6ac97678b3b942c64c5108f0329"
+ }
+ Frame {
+ msec: 784
+ hash: "bb9f893a9aaee60ab6c30918552828a4"
+ }
+ Frame {
+ msec: 800
+ hash: "65d1f29437aaaea33676757276f1e434"
+ }
+ Frame {
+ msec: 816
+ hash: "52adcf2509f3236ac8ef571708e77206"
+ }
+ Frame {
+ msec: 832
+ hash: "22df5e7eda8a813531d0e0366cbfbf64"
+ }
+ Frame {
+ msec: 848
+ hash: "fe9b7b7812dd2410b8ed2eb19aa78f4d"
+ }
+ Frame {
+ msec: 864
+ hash: "141e22de4469f316b5ef5471f3c7bba0"
+ }
+ Frame {
+ msec: 880
+ hash: "1125c0a105fc4a2cae36b798058ce23f"
+ }
+ Frame {
+ msec: 896
+ hash: "8c17c5da2ae867fb0016a485ba9e4166"
+ }
+ Frame {
+ msec: 912
+ hash: "d8da9fc7ec4dcefb894c5a6a71e9d001"
+ }
+ Frame {
+ msec: 928
+ hash: "00ff642bea89fd89de394d78f8c5db33"
+ }
+ Frame {
+ msec: 944
+ hash: "8549063d517a3ce1ffd44c56b3b6cf5e"
+ }
+ Frame {
+ msec: 960
+ image: "easefollow.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "95a642caa72bb31cc1e04ecc12d07cd0"
+ }
+ Frame {
+ msec: 992
+ hash: "e65c823476bf920d0386f62ca831e6a0"
+ }
+ Frame {
+ msec: 1008
+ hash: "91e8913dc693c91a674a10b5b088dd8f"
+ }
+ Frame {
+ msec: 1024
+ hash: "1a469ffa0d530f72c78dc14783891c78"
+ }
+ Frame {
+ msec: 1040
+ hash: "6e46a83d07f8bc034b421103ef0e4f8c"
+ }
+ Frame {
+ msec: 1056
+ hash: "8ddacab411a8b73b6c9e69576fa1b003"
+ }
+ Frame {
+ msec: 1072
+ hash: "41f419a85fe44efe27c9a526d83a1e9a"
+ }
+ Frame {
+ msec: 1088
+ hash: "73d4ece31b258f9caf4556ce20a5be1f"
+ }
+ Frame {
+ msec: 1104
+ hash: "ef3ebe0acb50386cf79b9f08fbba2fbc"
+ }
+ Frame {
+ msec: 1120
+ hash: "c11a84d2fa80f28adb1466409812e987"
+ }
+ Frame {
+ msec: 1136
+ hash: "2e9db854b02d28b38063ff2a8e821ed1"
+ }
+ Frame {
+ msec: 1152
+ hash: "48e073c0e6b19aea8314629a2179af87"
+ }
+ Frame {
+ msec: 1168
+ hash: "77e518b7428d93b67a8fb0d33d85ed97"
+ }
+ Frame {
+ msec: 1184
+ hash: "1d18323af9c62e015513451883f8b39f"
+ }
+ Frame {
+ msec: 1200
+ hash: "df49889ba157cdc1ca240d08d2760ad7"
+ }
+ Frame {
+ msec: 1216
+ hash: "7b8cd2bcf0a4c38ab870f27894a43d2f"
+ }
+ Frame {
+ msec: 1232
+ hash: "84f10e0c9fd57dd1799df7fc34c5ef01"
+ }
+ Frame {
+ msec: 1248
+ hash: "ead4e609bc4a0755032b1648485b9625"
+ }
+ Frame {
+ msec: 1264
+ hash: "9a9829c3bd4a3a4155383c37e21e8db8"
+ }
+ Frame {
+ msec: 1280
+ hash: "5008917f60256abad867f32c1caf954d"
+ }
+ Frame {
+ msec: 1296
+ hash: "c21455d66ed0754177af5ce44b7c7600"
+ }
+ Frame {
+ msec: 1312
+ hash: "e8332f2586d80a2700b610e8fe5c72d9"
+ }
+ Frame {
+ msec: 1328
+ hash: "0d0c8af138f98bae8a370ebec4a4796c"
+ }
+ Frame {
+ msec: 1344
+ hash: "04065e8feeb900d18deeb941572f7f10"
+ }
+ Frame {
+ msec: 1360
+ hash: "992a225b1f25bf5b21dd7f8a55dc4b70"
+ }
+ Frame {
+ msec: 1376
+ hash: "8ef739d91ee2a4337cbfc3dc94ce9845"
+ }
+ Frame {
+ msec: 1392
+ hash: "46744977a26b37ab65e65e1891ceafe7"
+ }
+ Frame {
+ msec: 1408
+ hash: "1b4c0d79eeb8d6b2e30172f3664407b9"
+ }
+ Frame {
+ msec: 1424
+ hash: "d572831ed34d14d1125570b8b8767bdb"
+ }
+ Frame {
+ msec: 1440
+ hash: "8b785c756d11e0fc18959d0897a45673"
+ }
+ Frame {
+ msec: 1456
+ hash: "164a71ffcea63ceb6c1ebeb8d0d07af1"
+ }
+ Frame {
+ msec: 1472
+ hash: "e128dc12d5117eed9f7c0a16e8348ba2"
+ }
+ Frame {
+ msec: 1488
+ hash: "4c7db5b12d83bf22b1c88ac06ca7c385"
+ }
+ Frame {
+ msec: 1504
+ hash: "c7283df8dbd78121e17a5893e3ea4f3c"
+ }
+ Frame {
+ msec: 1520
+ hash: "fea768e5bb43f6d86d88ced9f73915de"
+ }
+ Frame {
+ msec: 1536
+ hash: "b99b54f8e75452c539bb4e7b6a36e944"
+ }
+ Frame {
+ msec: 1552
+ hash: "b7274938d16f03b376ad9739e2e893f1"
+ }
+ Frame {
+ msec: 1568
+ hash: "e61601942193add8c1c8ebf5c5319932"
+ }
+ Frame {
+ msec: 1584
+ hash: "8fdc2181e0120391505706716ba7e5d7"
+ }
+ Frame {
+ msec: 1600
+ hash: "66f737ed28453da5175d6b5e807c374d"
+ }
+ Frame {
+ msec: 1616
+ hash: "2e00a7895d61edbe794f0a8000871b30"
+ }
+ Frame {
+ msec: 1632
+ hash: "1a279fc6b7c4105eccc4e3bc99481bef"
+ }
+ Frame {
+ msec: 1648
+ hash: "bc1dea4d23ca9bc29b72a8c2bde4787b"
+ }
+ Frame {
+ msec: 1664
+ hash: "8ef40e0be5fb82b32b365b3d4b85421d"
+ }
+ Frame {
+ msec: 1680
+ hash: "ee37c68bf38d5eed4e3e9a31306f6801"
+ }
+ Frame {
+ msec: 1696
+ hash: "303d760c87a7a833606c8e9f46cb5fc0"
+ }
+ Frame {
+ msec: 1712
+ hash: "cc2563b47c58efd39bec6b4e0f2995bb"
+ }
+ Frame {
+ msec: 1728
+ hash: "33f7daf09497510475283d6dc7c51228"
+ }
+ Frame {
+ msec: 1744
+ hash: "5b5e2de9934c80bd49e0eb7afd85151d"
+ }
+ Frame {
+ msec: 1760
+ hash: "5e6bf706336789ca6b60a82998b70113"
+ }
+ Frame {
+ msec: 1776
+ hash: "b4d4a860f49bfb88dd2079862b40b7ec"
+ }
+ Frame {
+ msec: 1792
+ hash: "07b571fa55327487e34a592c778beb67"
+ }
+ Frame {
+ msec: 1808
+ hash: "cb5b349a536cf75a83734181b3eab92b"
+ }
+ Frame {
+ msec: 1824
+ hash: "ce903bb58c5c86f2955e68412893aedf"
+ }
+ Frame {
+ msec: 1840
+ hash: "ffa89e879558c83ed538812a93e2fe29"
+ }
+ Frame {
+ msec: 1856
+ hash: "562aa66bf537853be82a654542c8b80e"
+ }
+ Frame {
+ msec: 1872
+ hash: "dc45dac0cc20220bcc81210fb5506ee2"
+ }
+ Frame {
+ msec: 1888
+ hash: "3b429eb827df0800a1ad8b906ea32ef9"
+ }
+ Frame {
+ msec: 1904
+ hash: "d6ebaf12515d9e24cdbf6d75080c0b28"
+ }
+ Frame {
+ msec: 1920
+ image: "easefollow.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "9f6d26224055c809dc2f3490cd0ff880"
+ }
+ Frame {
+ msec: 1952
+ hash: "5630cc8f0b401f7d81bdceaaae5cce68"
+ }
+ Frame {
+ msec: 1968
+ hash: "dafda60467e5e2b99c41543dd191ac2d"
+ }
+ Frame {
+ msec: 1984
+ hash: "e053cb07a734278cd111d612883c165e"
+ }
+ Frame {
+ msec: 2000
+ hash: "63870f3e99c11707004dab9439d61389"
+ }
+ Frame {
+ msec: 2016
+ hash: "14c311a6fab45f828c3a19535ea9edc8"
+ }
+ Frame {
+ msec: 2032
+ hash: "13e614446cbfcbfd2a7ecc5f0e8688df"
+ }
+ Frame {
+ msec: 2048
+ hash: "173c97f59da05b9347180a4824e60c06"
+ }
+ Frame {
+ msec: 2064
+ hash: "932e2a9bbcb7dc5befca8f63d8fa3c95"
+ }
+ Frame {
+ msec: 2080
+ hash: "4b8f232ffe0cbc7f900de5737c9f95be"
+ }
+ Frame {
+ msec: 2096
+ hash: "9686d294d4e931a5eed0e6b5bda63377"
+ }
+ Frame {
+ msec: 2112
+ hash: "969c569d92e3ec51dfbdd20d64432224"
+ }
+ Frame {
+ msec: 2128
+ hash: "0cef3550cca9fb5611b836098c517dd1"
+ }
+ Frame {
+ msec: 2144
+ hash: "6728080a09aa5d48462a3abb8e285e8a"
+ }
+ Frame {
+ msec: 2160
+ hash: "4b904dc671b7fc72db0b6e52543e96bd"
+ }
+ Frame {
+ msec: 2176
+ hash: "38232f89dffc9b16db6ea60b02f8d1be"
+ }
+ Frame {
+ msec: 2192
+ hash: "6b41f2a0f950eddad217a03e137f9a9b"
+ }
+ Frame {
+ msec: 2208
+ hash: "be576ea74c2c404da46fcf1d22de6df9"
+ }
+ Frame {
+ msec: 2224
+ hash: "3f44bad4b51ceff2944337064a5efa91"
+ }
+ Frame {
+ msec: 2240
+ hash: "e1ab98ac1366e9fd8af62a6a26878c73"
+ }
+ Frame {
+ msec: 2256
+ hash: "bd131e1725a54b3dbbb86a29ca8a56a9"
+ }
+ Frame {
+ msec: 2272
+ hash: "4d3e8af70f228643803f780c4e36f1a6"
+ }
+ Frame {
+ msec: 2288
+ hash: "853a5ab4271af7a7638454cfa883aa33"
+ }
+ Frame {
+ msec: 2304
+ hash: "ede9260157000f346900153ce2409278"
+ }
+ Frame {
+ msec: 2320
+ hash: "b2b16d8ce1ba89f0d9558ac387e25c3d"
+ }
+ Frame {
+ msec: 2336
+ hash: "387d338910453637c5cf80fa35528e56"
+ }
+ Frame {
+ msec: 2352
+ hash: "26deabf9cdd994455f2a8802eb0e04dc"
+ }
+ Frame {
+ msec: 2368
+ hash: "13939659a315dae1b81e3ea166102edf"
+ }
+ Frame {
+ msec: 2384
+ hash: "be92b55bb7562372401b25a9167abb2b"
+ }
+ Frame {
+ msec: 2400
+ hash: "ee7bf60d7ee97b7de5e909b9af88df80"
+ }
+ Frame {
+ msec: 2416
+ hash: "434313a3bcd1d7582b0d89b9a145ef09"
+ }
+ Frame {
+ msec: 2432
+ hash: "0857ca59a283897e3df62b9633488f83"
+ }
+ Frame {
+ msec: 2448
+ hash: "76718fc7e3d21b54930bc8307a57733a"
+ }
+ Frame {
+ msec: 2464
+ hash: "93a91588b38129053a462b920fd686e3"
+ }
+ Frame {
+ msec: 2480
+ hash: "2a2486c52fde915696fd8cbd3682e8db"
+ }
+ Frame {
+ msec: 2496
+ hash: "b1f4ab6cc5fb4a3a1b4885f2d1b29277"
+ }
+ Frame {
+ msec: 2512
+ hash: "4258afce8a85a2e9ead149e34b43d8fc"
+ }
+ Frame {
+ msec: 2528
+ hash: "6672c71b98e13d51ebb523aed9036a72"
+ }
+ Frame {
+ msec: 2544
+ hash: "eaa39af7eb78948f433e3b44a9454317"
+ }
+ Frame {
+ msec: 2560
+ hash: "0a766bc97bea67d4b848c703eaa6777a"
+ }
+ Frame {
+ msec: 2576
+ hash: "0b461ec1885ede1dd96b71cf38bfd3d6"
+ }
+ Frame {
+ msec: 2592
+ hash: "15efc929370a3864529080e30db1026a"
+ }
+ Frame {
+ msec: 2608
+ hash: "e1529e30ff1e4ea1b092a88e85f2f1f6"
+ }
+ Frame {
+ msec: 2624
+ hash: "f29bd9dbf7317e94b885da63f0cb7374"
+ }
+ Frame {
+ msec: 2640
+ hash: "e5294e087e2ce0d7d936c0129b6c37ae"
+ }
+ Frame {
+ msec: 2656
+ hash: "9c63129e774b391cc398cf5da5c9339c"
+ }
+ Frame {
+ msec: 2672
+ hash: "4371d85854419d4b00671176bb7c5a2b"
+ }
+ Frame {
+ msec: 2688
+ hash: "dd10b3f50e2fdc56c75f00321634b1cc"
+ }
+ Frame {
+ msec: 2704
+ hash: "aac6256b21152a5f1f8c576b667d275e"
+ }
+ Frame {
+ msec: 2720
+ hash: "c937c44037b2228590d334df4d56a86f"
+ }
+ Frame {
+ msec: 2736
+ hash: "f6c714db51cbd1bdb737afe612c33f9c"
+ }
+ Frame {
+ msec: 2752
+ hash: "0bba45af79f3201bc7cf042d5c648f73"
+ }
+ Frame {
+ msec: 2768
+ hash: "941b08ddbafea3bd46262c060b1e290b"
+ }
+ Frame {
+ msec: 2784
+ hash: "d898918dc2023de239b4ab38f7420960"
+ }
+ Frame {
+ msec: 2800
+ hash: "d1a16dc2282329113093d06862e7a871"
+ }
+ Frame {
+ msec: 2816
+ hash: "bba5359475f643fbeee240e71e843d4c"
+ }
+ Frame {
+ msec: 2832
+ hash: "03cf861f4b6bc767e723e47e95c2448b"
+ }
+ Frame {
+ msec: 2848
+ hash: "a64bf158c6199b88bc2db3b741d342f0"
+ }
+ Frame {
+ msec: 2864
+ hash: "cf0fe7cb42ba842f1c28c1211adb768d"
+ }
+ Frame {
+ msec: 2880
+ image: "easefollow.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "9b3c6414e4ef5a452a5c92bb0b893fc3"
+ }
+ Frame {
+ msec: 2912
+ hash: "7cc7ddec3ac2d8cac33c0b0f80a7544d"
+ }
+ Frame {
+ msec: 2928
+ hash: "7dd4e7d606e953c872c57fad786d64aa"
+ }
+ Frame {
+ msec: 2944
+ hash: "117cc903a39d99ca22f6556095e6f883"
+ }
+ Frame {
+ msec: 2960
+ hash: "c6c9304fd65fee1909473bdb21ac7806"
+ }
+ Frame {
+ msec: 2976
+ hash: "8e704fe81c040f49c4d80e7dcc46084d"
+ }
+ Frame {
+ msec: 2992
+ hash: "d202d5c0a058e1e088fdd280e59f17bb"
+ }
+ Frame {
+ msec: 3008
+ hash: "90c072dea32c056f8bd6d010df681929"
+ }
+ Frame {
+ msec: 3024
+ hash: "80b4e99f1b47e64084e295a2a3e1121e"
+ }
+ Frame {
+ msec: 3040
+ hash: "41d6307075ec9ae9e92d227921f71289"
+ }
+ Frame {
+ msec: 3056
+ hash: "f33de23cf4a5c4881310c6866261d387"
+ }
+ Frame {
+ msec: 3072
+ hash: "441faa0a1fc95d66b27479dfc1e40188"
+ }
+ Frame {
+ msec: 3088
+ hash: "2314b5f6ba3864abd5e87bc87bd621b0"
+ }
+ Frame {
+ msec: 3104
+ hash: "e71e3b0ad953258ceef3101e38283fdb"
+ }
+ Frame {
+ msec: 3120
+ hash: "890c3b0e727f136bf1ccc486531c9677"
+ }
+ Frame {
+ msec: 3136
+ hash: "2a0d23e6dcc6475c323dbf8eb36e8094"
+ }
+ Frame {
+ msec: 3152
+ hash: "692682e82347936f87a66484b428e959"
+ }
+ Frame {
+ msec: 3168
+ hash: "cf4005c08789762ad21be1a1d78755c9"
+ }
+ Frame {
+ msec: 3184
+ hash: "566184563091626bb20ae679e3ce3b91"
+ }
+ Frame {
+ msec: 3200
+ hash: "f88a24ad3bbc2699924bb9a7ff6490b3"
+ }
+ Frame {
+ msec: 3216
+ hash: "23f3f63d07b2bdc2b82ff4e8606a634d"
+ }
+ Frame {
+ msec: 3232
+ hash: "fe121c71ce469ec6f0bf957eb2f0447b"
+ }
+ Frame {
+ msec: 3248
+ hash: "ba217690a33c701afe11842aa8105cbb"
+ }
+ Frame {
+ msec: 3264
+ hash: "e5c7c1323108f13ba26f5198cc62c137"
+ }
+ Frame {
+ msec: 3280
+ hash: "664f76d3d0008b56be2790c470befc91"
+ }
+ Frame {
+ msec: 3296
+ hash: "b3f54070ba64b983ccd2a15941ef4c35"
+ }
+ Frame {
+ msec: 3312
+ hash: "8a0ba2ae36ad3811778f3a3bc55743f5"
+ }
+ Frame {
+ msec: 3328
+ hash: "bfdc71733ca45a2ba2e8abf751554a62"
+ }
+ Frame {
+ msec: 3344
+ hash: "686e4d7bb5ae148d37fc2a1f6004a33a"
+ }
+ Frame {
+ msec: 3360
+ hash: "29c553d9fe42fdbbd019d0ead61dffa0"
+ }
+ Frame {
+ msec: 3376
+ hash: "bfa2b72c6554a2ed80a3b86f2cbed986"
+ }
+ Frame {
+ msec: 3392
+ hash: "074ff90417a947f0a04926d5675d073b"
+ }
+ Frame {
+ msec: 3408
+ hash: "6f56f9e0aa40149156ca71d6f8d4476a"
+ }
+ Frame {
+ msec: 3424
+ hash: "950ce749bbf572021de2dd1688cb87e6"
+ }
+ Frame {
+ msec: 3440
+ hash: "2d0903bd71862dc6f28bd702d955ae99"
+ }
+ Frame {
+ msec: 3456
+ hash: "2733adae56728f1b744a4086ecb98052"
+ }
+ Frame {
+ msec: 3472
+ hash: "779859d739e799bba15beeb97d18e682"
+ }
+ Frame {
+ msec: 3488
+ hash: "9074386cfabe136b8839637e5cd58f57"
+ }
+ Frame {
+ msec: 3504
+ hash: "fa5bcbf20c6ad0a218f23d98961229a1"
+ }
+ Frame {
+ msec: 3520
+ hash: "5406c94da1717eaa5eb0010564216059"
+ }
+ Frame {
+ msec: 3536
+ hash: "27d0a3c3a33c04df843bebd72ef79824"
+ }
+ Frame {
+ msec: 3552
+ hash: "270df9c99c2679071b854b3d82337f79"
+ }
+ Frame {
+ msec: 3568
+ hash: "5b3945505443a67e7a91f66fe42b4fe3"
+ }
+ Frame {
+ msec: 3584
+ hash: "9a2f8565c354cb366725368ed323ccf4"
+ }
+ Frame {
+ msec: 3600
+ hash: "6702cb7ccd61c008b511932d7bd5d107"
+ }
+ Frame {
+ msec: 3616
+ hash: "f6b86c3a1cc88357f588b6dae11aae30"
+ }
+ Frame {
+ msec: 3632
+ hash: "b10c23937f420db72af8abaf126f71c2"
+ }
+ Frame {
+ msec: 3648
+ hash: "7d6b0810ffc6e488c8168e19bccb7358"
+ }
+ Frame {
+ msec: 3664
+ hash: "c01ef69ec46391909619434e9d9dd0ce"
+ }
+ Frame {
+ msec: 3680
+ hash: "a046464fccb0c5ba1f63f8b569821a44"
+ }
+ Frame {
+ msec: 3696
+ hash: "8763c526924d882438f9aa9bfb4fe87d"
+ }
+ Frame {
+ msec: 3712
+ hash: "dede7a62d6e5c10e8f30caa075bd8dfd"
+ }
+ Frame {
+ msec: 3728
+ hash: "3b408e5c986f5bb01d8c3949876b792f"
+ }
+ Frame {
+ msec: 3744
+ hash: "0a458f3b17cdd3ea85522779c9346af9"
+ }
+ Frame {
+ msec: 3760
+ hash: "fef521f0301cce90af88d37e6d441ec8"
+ }
+ Frame {
+ msec: 3776
+ hash: "3d083e0822242b3b37c6839ca91a1f68"
+ }
+ Frame {
+ msec: 3792
+ hash: "f8fe013a717e6e61830137bdc78a8b40"
+ }
+ Frame {
+ msec: 3808
+ hash: "0ae80ad65dd194043500fa50b5a547a6"
+ }
+ Frame {
+ msec: 3824
+ hash: "a53c67fa32ef971eaea202fa5d8a6ad6"
+ }
+ Frame {
+ msec: 3840
+ image: "easefollow.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "41f86bbf0658b127f01e8d46d7ec941b"
+ }
+ Frame {
+ msec: 3872
+ hash: "d20f21df127565f9eb87c5d759a638d9"
+ }
+ Frame {
+ msec: 3888
+ hash: "85ff94f03cea3e111807e90d062c1367"
+ }
+ Frame {
+ msec: 3904
+ hash: "aa637850fe5f05a71ac4c7d31dbb36ee"
+ }
+ Frame {
+ msec: 3920
+ hash: "c86a67096c5e62bb73b785cdf6a5b6b1"
+ }
+ Frame {
+ msec: 3936
+ hash: "9d53537f2c50a0016bf7bb522b2ec3d8"
+ }
+ Frame {
+ msec: 3952
+ hash: "b48630c27c27785ddce568a85d4dc58f"
+ }
+ Frame {
+ msec: 3968
+ hash: "01c1bdb6e261cc509f26712b13eeb554"
+ }
+ Frame {
+ msec: 3984
+ hash: "af8a44284695fd999acd5944434f0372"
+ }
+ Frame {
+ msec: 4000
+ hash: "b156d9d6d5163f007ac4a309d8927ae9"
+ }
+ Frame {
+ msec: 4016
+ hash: "2df3715416c3c005f04b66fe1258c0d8"
+ }
+ Frame {
+ msec: 4032
+ hash: "96b4a7c6b8542b50fc345b54d38ec82a"
+ }
+ Frame {
+ msec: 4048
+ hash: "7e62e757fafa06833444c3a7e1d96ce4"
+ }
+ Frame {
+ msec: 4064
+ hash: "5222a8f9366c7d974d0687d05d229069"
+ }
+ Frame {
+ msec: 4080
+ hash: "ec96169f4633c3bddfd582feeb8e9ad4"
+ }
+ Frame {
+ msec: 4096
+ hash: "cb10db893d1e1cb2a370507dc5679985"
+ }
+ Frame {
+ msec: 4112
+ hash: "d7e346c2ac77796bde639bd829b72e85"
+ }
+ Frame {
+ msec: 4128
+ hash: "ba5bea8857e4fb444bedd3873563e7db"
+ }
+ Frame {
+ msec: 4144
+ hash: "05556fba5d1714f70fd6c2bfb43d213b"
+ }
+ Frame {
+ msec: 4160
+ hash: "aeeabf35f9759f045a670a9b9f90dc68"
+ }
+ Frame {
+ msec: 4176
+ hash: "131bd453f4c7726e5fdd546252700e2e"
+ }
+ Frame {
+ msec: 4192
+ hash: "7c5c3b5bb7a4082e6b9b43640e29f4e2"
+ }
+ Frame {
+ msec: 4208
+ hash: "07515e21b7a7895f333e4a8bbd2202eb"
+ }
+ Frame {
+ msec: 4224
+ hash: "6cf136f223ac6edd39ba6ed9b4445884"
+ }
+ Frame {
+ msec: 4240
+ hash: "84264f5745add8a922101735ed8def84"
+ }
+ Frame {
+ msec: 4256
+ hash: "660863d1e4b361f2e5445b417be0d2ad"
+ }
+ Frame {
+ msec: 4272
+ hash: "7ceb86f4b16546370d72164d0ca3147c"
+ }
+ Frame {
+ msec: 4288
+ hash: "a13e97da9722545ad87ac3c5eb92c497"
+ }
+ Frame {
+ msec: 4304
+ hash: "5896b5307cbd609d2062d3607786d40c"
+ }
+ Frame {
+ msec: 4320
+ hash: "c8c511115394116e4544c67f615ea5d5"
+ }
+ Frame {
+ msec: 4336
+ hash: "59ca5fdf12a735e5c292901b54acccb2"
+ }
+ Frame {
+ msec: 4352
+ hash: "155cce2738d34e0eac86f5eb63d638f0"
+ }
+ Frame {
+ msec: 4368
+ hash: "83a840c3ae7dbd9a05c17fdd8be07d7a"
+ }
+ Frame {
+ msec: 4384
+ hash: "800a15de28b14d88f0ad58fc3f4a2520"
+ }
+ Frame {
+ msec: 4400
+ hash: "c8381439a3cd3f9e7f80061023723a6e"
+ }
+ Frame {
+ msec: 4416
+ hash: "e3d63000db4b9458b202dece49d1bdba"
+ }
+ Frame {
+ msec: 4432
+ hash: "c943e56781695798f3c221f8ab09681a"
+ }
+ Frame {
+ msec: 4448
+ hash: "1137ee66d7fbf5a84c33f5ffff15b3dd"
+ }
+ Frame {
+ msec: 4464
+ hash: "5a98013cc4462aad18cad8d941f77aa0"
+ }
+ Frame {
+ msec: 4480
+ hash: "d0b3748fb49a13c0ad9a68b0e2914921"
+ }
+ Frame {
+ msec: 4496
+ hash: "12113f71f9117670acbd7877edded7e0"
+ }
+ Frame {
+ msec: 4512
+ hash: "22983424da08cdae7a9c6a8905b37736"
+ }
+ Frame {
+ msec: 4528
+ hash: "b2db5618a025cefb2650124c81880c49"
+ }
+ Frame {
+ msec: 4544
+ hash: "84fb5e7edc5b42163a83e0cd362b3a46"
+ }
+ Frame {
+ msec: 4560
+ hash: "39d6f1ed0f60a0c366c22e1442c455ac"
+ }
+ Frame {
+ msec: 4576
+ hash: "702367f6e4aaa2a862e57f9e02a08758"
+ }
+ Frame {
+ msec: 4592
+ hash: "ecc75293bc156c560d55cb7d278a4e58"
+ }
+ Frame {
+ msec: 4608
+ hash: "e68af8e97ce65376fd7904e599440c92"
+ }
+ Frame {
+ msec: 4624
+ hash: "75fe9f766d6cf636cd72d8879a461439"
+ }
+ Frame {
+ msec: 4640
+ hash: "162aef147ef4bbb0cd92bd70e4f37f62"
+ }
+ Frame {
+ msec: 4656
+ hash: "d879aae8949976c7bad4d97f1e5b5549"
+ }
+ Frame {
+ msec: 4672
+ hash: "8a983d7228190721f988de2d72cb3aa2"
+ }
+ Frame {
+ msec: 4688
+ hash: "a4f3c63fde664d128cd35b129a4f9a23"
+ }
+ Frame {
+ msec: 4704
+ hash: "115fb5f3c9b7f1c28ab379596faba91c"
+ }
+ Frame {
+ msec: 4720
+ hash: "ea9600c4d6c77a3b32e59401aa84fe96"
+ }
+ Frame {
+ msec: 4736
+ hash: "bd6531fdd9cfd46af2df73bacb31f4c5"
+ }
+ Frame {
+ msec: 4752
+ hash: "33bdcf1df50eab5e7963c649fbd32226"
+ }
+ Frame {
+ msec: 4768
+ hash: "236e88fb72369a55f9eba4b50712ae85"
+ }
+ Frame {
+ msec: 4784
+ hash: "5eb3c14a6296fb3a1c58603b2fc937c8"
+ }
+ Frame {
+ msec: 4800
+ image: "easefollow.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "31d11a1ce6422524241c77603fe53e61"
+ }
+ Frame {
+ msec: 4832
+ hash: "44e8b9947026c10b922c84883dd8e889"
+ }
+ Frame {
+ msec: 4848
+ hash: "d049e4f7c4bc1849398859a4d630c1b3"
+ }
+ Frame {
+ msec: 4864
+ hash: "e83b4757898e4eeef74be8213619fbfa"
+ }
+ Frame {
+ msec: 4880
+ hash: "d08f40615f2d5abc6236e856a67575dd"
+ }
+ Frame {
+ msec: 4896
+ hash: "d9cb26bf1b8bbafb2aed8f74bd454077"
+ }
+ Frame {
+ msec: 4912
+ hash: "aa321b94a6cc53b2ebac80e834c0a908"
+ }
+ Frame {
+ msec: 4928
+ hash: "48da37164be156b67a4b3b14e50f2375"
+ }
+ Frame {
+ msec: 4944
+ hash: "f522ce7728a4a9e7fad86c72f29bd8f9"
+ }
+ Frame {
+ msec: 4960
+ hash: "9bc1d16b4bda596702a3d8a3fad8a5c5"
+ }
+ Frame {
+ msec: 4976
+ hash: "5275dccf18745dec6c59b846de17d9ef"
+ }
+ Frame {
+ msec: 4992
+ hash: "4eb6babc177b96f69b148d52f56d82d7"
+ }
+ Frame {
+ msec: 5008
+ hash: "ccdfb454070ac04c4fe4f3513c52f8c8"
+ }
+ Frame {
+ msec: 5024
+ hash: "07f6adad6e8ff4f0eff92c758636a951"
+ }
+ Frame {
+ msec: 5040
+ hash: "241e0ad9218d49be477509e008e45548"
+ }
+ Frame {
+ msec: 5056
+ hash: "151a482e821779da8a61063f1cc73f8c"
+ }
+ Frame {
+ msec: 5072
+ hash: "1499d207c5a3a9bc7bbb84d9c5e35578"
+ }
+ Frame {
+ msec: 5088
+ hash: "c253753f653157a5058ef071f16b8bbb"
+ }
+ Frame {
+ msec: 5104
+ hash: "ec9fea5a870724a106b952edef7fb466"
+ }
+ Frame {
+ msec: 5120
+ hash: "99b673f8ed049d31a2aecabcc46d841d"
+ }
+ Frame {
+ msec: 5136
+ hash: "61e77fea693ea55aafbdc94c40c3ab33"
+ }
+ Frame {
+ msec: 5152
+ hash: "53e44a3732ee6858d5bd596b4c5d5305"
+ }
+ Frame {
+ msec: 5168
+ hash: "5b25d3894a56dc4f4a0aa8f88cb69e23"
+ }
+ Frame {
+ msec: 5184
+ hash: "5683ad02f1b9126f4e4ff6b03044fdc6"
+ }
+ Frame {
+ msec: 5200
+ hash: "0a3ec255575ec1b70e0b10cf59c7c5fd"
+ }
+ Frame {
+ msec: 5216
+ hash: "0f5f46fe3fdf42d4651891f13c8afc7e"
+ }
+ Frame {
+ msec: 5232
+ hash: "b6955407245c73e356a460d99dad77be"
+ }
+ Frame {
+ msec: 5248
+ hash: "6018b53414921943b37c33fa04a29697"
+ }
+ Frame {
+ msec: 5264
+ hash: "ff184d349ce0b648f8c1fce91ae997f6"
+ }
+ Frame {
+ msec: 5280
+ hash: "9c112a3a785d970593887eeab72fa7fe"
+ }
+ Frame {
+ msec: 5296
+ hash: "00384fb20d4c6cd6236d519d2d734cc3"
+ }
+ Frame {
+ msec: 5312
+ hash: "601ea99400e5f50ee9a5a4b74b6f3017"
+ }
+ Frame {
+ msec: 5328
+ hash: "9afed04bf7eca24d9b6d31ac84ae59c2"
+ }
+ Frame {
+ msec: 5344
+ hash: "1983319c8043bfe403513af7ccb5b924"
+ }
+ Frame {
+ msec: 5360
+ hash: "b0244e4e1b61202ede78405415c22bca"
+ }
+ Frame {
+ msec: 5376
+ hash: "ec5516b1aaeace8784b04649c51ab40b"
+ }
+ Frame {
+ msec: 5392
+ hash: "8ff7d2001594abb588f769bab15406d7"
+ }
+ Frame {
+ msec: 5408
+ hash: "64d5fd96a1726aa5276f9b508566676f"
+ }
+ Frame {
+ msec: 5424
+ hash: "ab49497a6c825038354f076bdbbbc235"
+ }
+ Frame {
+ msec: 5440
+ hash: "6b821e43be932800b20af58a7b5a1ff7"
+ }
+ Frame {
+ msec: 5456
+ hash: "683a2902300f930e2a81a82dc37c583b"
+ }
+ Frame {
+ msec: 5472
+ hash: "86d7946d7fbb66369ccbf26430939225"
+ }
+ Frame {
+ msec: 5488
+ hash: "fb38f5fb6555fc14e95a47c595a6ea0c"
+ }
+ Frame {
+ msec: 5504
+ hash: "3878f685d9fa3299e9ffe78c22595387"
+ }
+ Frame {
+ msec: 5520
+ hash: "b48840a68ff007901b02332c7177f315"
+ }
+ Frame {
+ msec: 5536
+ hash: "9d847abc99220b04aceef12e5c09aac0"
+ }
+ Frame {
+ msec: 5552
+ hash: "9893ac89fda64d96ec4140c3c87e17a5"
+ }
+ Frame {
+ msec: 5568
+ hash: "cd94e1c36e6be9877cd9c12df42bd968"
+ }
+ Frame {
+ msec: 5584
+ hash: "c1ce5e53b74af022dc103ad74ff5f1af"
+ }
+ Frame {
+ msec: 5600
+ hash: "b3630e08eac02a9578a00b01baabaaba"
+ }
+ Frame {
+ msec: 5616
+ hash: "0eb9241aa1f9526c1e24ba76d630805c"
+ }
+ Frame {
+ msec: 5632
+ hash: "1b532ae7f9253469467522d4ca66c47b"
+ }
+ Frame {
+ msec: 5648
+ hash: "7e6e49079ed6330da2e337a5e4ffd730"
+ }
+ Frame {
+ msec: 5664
+ hash: "0391d668f4b906b244a5f5c1713573c2"
+ }
+ Frame {
+ msec: 5680
+ hash: "8070fa3280d0d64bf976d4a276359c4c"
+ }
+ Frame {
+ msec: 5696
+ hash: "f7d0d36a2d40c798f56ac7ecc1effca6"
+ }
+ Frame {
+ msec: 5712
+ hash: "9f8e35ee5080e811c670c480a9c2bd9f"
+ }
+ Frame {
+ msec: 5728
+ hash: "c7fea75a43a59a11aa504df32afcdaf8"
+ }
+ Frame {
+ msec: 5744
+ hash: "7e549a93ffc6ddcc3d8111f10c05b29e"
+ }
+ Frame {
+ msec: 5760
+ image: "easefollow.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "92d298262f610a2dafa095e3d67c80af"
+ }
+ Frame {
+ msec: 5792
+ hash: "db8826b0b2feece0999863b8827a6234"
+ }
+ Frame {
+ msec: 5808
+ hash: "12c7050e8094bb39212aed0163666d1a"
+ }
+ Frame {
+ msec: 5824
+ hash: "69531beace5c749bf90160a4b25f736a"
+ }
+ Frame {
+ msec: 5840
+ hash: "ce873e4dbc8853183b54d59991b2e030"
+ }
+ Frame {
+ msec: 5856
+ hash: "fa1078973634578d69527402b11fb7e0"
+ }
+ Frame {
+ msec: 5872
+ hash: "1e3b3db590567c0afd1913101192cda9"
+ }
+ Frame {
+ msec: 5888
+ hash: "7b9e097018278b784973a546da3d401a"
+ }
+ Frame {
+ msec: 5904
+ hash: "a7b0667093888480de6697280aeea9ba"
+ }
+ Frame {
+ msec: 5920
+ hash: "e381f2422ead86575abf643b0b0c9797"
+ }
+ Frame {
+ msec: 5936
+ hash: "44b08f5a0de2a6955e02f67753f409c8"
+ }
+ Frame {
+ msec: 5952
+ hash: "db04665e58448ecc7f95baa3e4ea79a5"
+ }
+ Frame {
+ msec: 5968
+ hash: "0e4aae728d8d543538a9446c41e18e91"
+ }
+ Frame {
+ msec: 5984
+ hash: "e3cd1bbb1d9963e5c74d36e526a871b0"
+ }
+ Frame {
+ msec: 6000
+ hash: "bcd893a0e200ddda4e1468c159018865"
+ }
+ Frame {
+ msec: 6016
+ hash: "9c5293356aa6312f909e655e9bcf961b"
+ }
+ Frame {
+ msec: 6032
+ hash: "0bab7b9166f6af554d4fa0badeec739e"
+ }
+ Frame {
+ msec: 6048
+ hash: "e74996581f0aaeced118c5cbfd977d90"
+ }
+ Frame {
+ msec: 6064
+ hash: "5d128eb20a2a23da8c2d9a35293e5769"
+ }
+ Frame {
+ msec: 6080
+ hash: "ebbbc343698287faf7ffa7526a726b54"
+ }
+ Frame {
+ msec: 6096
+ hash: "d812172192cc19590f9a2d7dbf970439"
+ }
+ Frame {
+ msec: 6112
+ hash: "60263addb1b4b5ac43f8199b8ed77e40"
+ }
+ Frame {
+ msec: 6128
+ hash: "702a1ff2876eaaa59359811bb6437c5b"
+ }
+ Frame {
+ msec: 6144
+ hash: "8f81dc43decce5094ee7a089f0009730"
+ }
+ Frame {
+ msec: 6160
+ hash: "efda5dd9edd83a0da089d0b28806c6b6"
+ }
+ Frame {
+ msec: 6176
+ hash: "7274a33a7a5272d7abdaf41f4b2bf664"
+ }
+ Frame {
+ msec: 6192
+ hash: "0cc80077476e721a3da85c17cc56a65e"
+ }
+ Frame {
+ msec: 6208
+ hash: "e65a534f0e7e70520a9c2cfa09ee8159"
+ }
+ Frame {
+ msec: 6224
+ hash: "b05b514c63bd8998785382e6a9cbd849"
+ }
+ Frame {
+ msec: 6240
+ hash: "10a04d641e0cc65c120d8bcf2f3e54c8"
+ }
+ Frame {
+ msec: 6256
+ hash: "68418e2206a496dd15a05b50fec6f87e"
+ }
+ Frame {
+ msec: 6272
+ hash: "6549e0989e1c86e3a7eb0dcc8dd31380"
+ }
+ Frame {
+ msec: 6288
+ hash: "bd0193c2cbc8958f674f4ec52a693b72"
+ }
+ Frame {
+ msec: 6304
+ hash: "746440b45a3688dbd32b34c57454e956"
+ }
+ Frame {
+ msec: 6320
+ hash: "6b54ee8af30be2178e8b3afab5dcb4c7"
+ }
+ Frame {
+ msec: 6336
+ hash: "ba2fbad3fe2fe25ec0c0c542659168dc"
+ }
+ Frame {
+ msec: 6352
+ hash: "84bd72703bd8200f8f090783d06ae451"
+ }
+ Frame {
+ msec: 6368
+ hash: "17c9fb063280c2ee4cb4a13273bbb199"
+ }
+ Frame {
+ msec: 6384
+ hash: "df28fd55719f5c2d164596d02c2faff2"
+ }
+ Frame {
+ msec: 6400
+ hash: "c2e280e78e892200d40022d17ce695b7"
+ }
+ Frame {
+ msec: 6416
+ hash: "c657caa0c5158e178ec5df80bbad6bcb"
+ }
+ Frame {
+ msec: 6432
+ hash: "d91f4f6ec6503fe8280f9b02dd11e64a"
+ }
+ Frame {
+ msec: 6448
+ hash: "0fb9400cdca9dbd4035fbf8af9952360"
+ }
+ Frame {
+ msec: 6464
+ hash: "cac0e1b4aa094306b95f90ede4705391"
+ }
+ Frame {
+ msec: 6480
+ hash: "e60a4bb14300a937a767effee931c60f"
+ }
+ Frame {
+ msec: 6496
+ hash: "8b461397e3f210ee7e9305dcab2af2db"
+ }
+ Frame {
+ msec: 6512
+ hash: "6ce9ec0942dd06c9f73929a7e176852c"
+ }
+ Frame {
+ msec: 6528
+ hash: "da36e254635eea854a6552ba008117f9"
+ }
+ Frame {
+ msec: 6544
+ hash: "0bec6402b5eb09d05ce8e9ff5253ea8d"
+ }
+ Frame {
+ msec: 6560
+ hash: "72f6610527d395ca590eda166ef6bc4e"
+ }
+ Frame {
+ msec: 6576
+ hash: "622ae3fd47adb2432e2a40d3c5539393"
+ }
+ Frame {
+ msec: 6592
+ hash: "0b18c49e2bbf9370216e06b555faf183"
+ }
+ Frame {
+ msec: 6608
+ hash: "0c090bb975fb883301b52479fd6f5fdf"
+ }
+ Frame {
+ msec: 6624
+ hash: "c4205d7ecb7327426d9591e77247acab"
+ }
+ Frame {
+ msec: 6640
+ hash: "f0e0075243e4b8aa97056248fe6033ed"
+ }
+ Frame {
+ msec: 6656
+ hash: "47f99b40a8764ee9d9e429061fb7acb2"
+ }
+ Frame {
+ msec: 6672
+ hash: "49e8c1e974b0716570d85109b53817a5"
+ }
+ Frame {
+ msec: 6688
+ hash: "72f981bad831b6ed858009527902f734"
+ }
+ Frame {
+ msec: 6704
+ hash: "e959a0493b06369a429f90f66cb65977"
+ }
+ Frame {
+ msec: 6720
+ image: "easefollow.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "93470d983282f24425558f47ad705154"
+ }
+ Frame {
+ msec: 6752
+ hash: "cdccbe1a7c7abd4a6a6ee754ed0c9759"
+ }
+ Frame {
+ msec: 6768
+ hash: "0e1b7b5332a9fcdb492db5314a2a0267"
+ }
+ Frame {
+ msec: 6784
+ hash: "1e1ffe3439aab51d0b325474e7d8dc28"
+ }
+ Frame {
+ msec: 6800
+ hash: "e8e7e9b5871caf77f15678616d6c9c8a"
+ }
+ Frame {
+ msec: 6816
+ hash: "9771fff3b7752154d093c038bea73d28"
+ }
+ Frame {
+ msec: 6832
+ hash: "1af851ea214cbddb0e3a743084a5cf6b"
+ }
+ Frame {
+ msec: 6848
+ hash: "1566182a7e29bbb738705a90c4909617"
+ }
+ Frame {
+ msec: 6864
+ hash: "feed650e1d948fe622234d212fb745f2"
+ }
+ Frame {
+ msec: 6880
+ hash: "3cd3d063275b91f9680717421c118ba4"
+ }
+ Frame {
+ msec: 6896
+ hash: "c1f088801334762cd499e7cc70e1e59a"
+ }
+ Frame {
+ msec: 6912
+ hash: "e8f8d153e7a027a5092a9209411d97f7"
+ }
+ Frame {
+ msec: 6928
+ hash: "f11747c3533b4b2fc77a64ca0cace8b0"
+ }
+ Frame {
+ msec: 6944
+ hash: "21618c67a2a8bbce86fc872060ad40e8"
+ }
+ Frame {
+ msec: 6960
+ hash: "02da96335db74b87ceefe91b1dfe72e6"
+ }
+ Frame {
+ msec: 6976
+ hash: "2b2e4143143ead8dea5865fd782f1775"
+ }
+ Frame {
+ msec: 6992
+ hash: "13e710900b05e26cdb030b1e2b2be715"
+ }
+ Frame {
+ msec: 7008
+ hash: "29e8995d17aac4d02034debcbb9fcb98"
+ }
+ Frame {
+ msec: 7024
+ hash: "1099db1b3e4c69e84c6ab1b7c311bf1e"
+ }
+ Frame {
+ msec: 7040
+ hash: "cc7cb720043334f1eeb385dce4389dc2"
+ }
+ Frame {
+ msec: 7056
+ hash: "34c7a62c1bc7261e2fd31c40068b37a7"
+ }
+ Frame {
+ msec: 7072
+ hash: "7fafbe05cbcaa21893e3aa0f1fcfb5a0"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7088
+ hash: "5b26c8cf047706633795a8ed3e703a89"
+ }
+ Frame {
+ msec: 7104
+ hash: "e0774bf9e74d0cde81c5cb216a9258fc"
+ }
+ Frame {
+ msec: 7120
+ hash: "0870262f643245e13f4fba79fd575897"
+ }
+ Frame {
+ msec: 7136
+ hash: "8faf0d050bb435ade8af5012c1a6b0dc"
+ }
+ Frame {
+ msec: 7152
+ hash: "382c037895cc39a6870db57b5016c01f"
+ }
+ Frame {
+ msec: 7168
+ hash: "f1f5a2cbc103ab1bee9f537fa8266e03"
+ }
+}
diff --git a/tests/auto/declarative/visual/qmleasefollow/easefollow.qml b/tests/auto/declarative/visual/qmleasefollow/easefollow.qml
new file mode 100644
index 0000000..d0fac42
--- /dev/null
+++ b/tests/auto/declarative/visual/qmleasefollow/easefollow.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 240; color: "gray"
+
+ Rectangle {
+ id: rect
+ width: 50; height: 20; y: 30; color: "black"
+ x: SequentialAnimation {
+ running: true; repeat: true
+ NumberAnimation { from: 50; to: 700; duration: 2000 }
+ NumberAnimation { from: 700; to: 50; duration: 2000 }
+ }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 60; color: "red"
+ x: EaseFollow { source: rect.x; velocity: 400 }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 90; color: "yellow"
+ x: EaseFollow { source: rect.x; velocity: 300; reversingMode: EaseFollow.Immediate }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 120; color: "green"
+ x: EaseFollow { source: rect.x; reversingMode: EaseFollow.Sync }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 150; color: "purple"
+ x: EaseFollow { source: rect.x; maximumEasingTime: 200 }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 180; color: "blue"
+ x: EaseFollow { source: rect.x; duration: 300 }
+ }
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
index 53eba32..5bd7a0a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
@@ -63,5 +63,20 @@ void FindDialog::reset()
{
tr("%n item(s)", "merge from singular to plural form", 4);
tr("%n item(s)", "merge from a finished singular form to an unfinished plural form", 4);
-}
+
+
+ //% "Hello"
+ qtTrId("xx_hello");
+
+ //% "New world"
+ qtTrId("xx_world");
+
+
+ //= new_id
+ tr("this is just some text");
+
+
+ //: A message without source string
+ qtTrId("qtn_virtual");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
index d06252c..379cce4 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
@@ -1,6 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="1.1" language="zh_CN">
<context>
+ <name></name>
+ <message id="xx_hello">
+ <location filename="finddialog.cpp" line="70"/>
+ <source>Hello</source>
+ <translation>Hallo</translation>
+ </message>
+ <message id="xx_world">
+ <location filename="finddialog.cpp" line="73"/>
+ <source>World</source>
+ <translation>Welt</translation>
+ </message>
+ <message id="qtn_virtual">
+ <location filename="finddialog.cpp" line="79"/>
+ <extracomment>A message without source string</extracomment>
+ </message>
+</context>
+<context>
<name>FindDialog</name>
<message>
<source></source>
@@ -44,5 +61,10 @@
<numerusform></numerusform>
</translation>
</message>
+ <message>
+ <location filename="finddialog.cpp" line="59"/>
+ <source>this is just some text</source>
+ <translation type="unfinished">Unfertige Uebersetzung</translation>
+ </message>
</context>
</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
index be4e02e..de43266 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
@@ -2,6 +2,26 @@
<!DOCTYPE TS>
<TS version="2.0" language="zh_CN">
<context>
+ <name></name>
+ <message id="xx_hello">
+ <location filename="finddialog.cpp" line="70"/>
+ <source>Hello</source>
+ <translation>Hallo</translation>
+ </message>
+ <message id="xx_world">
+ <location filename="finddialog.cpp" line="73"/>
+ <source>New world</source>
+ <oldsource>World</oldsource>
+ <translation type="unfinished">Welt</translation>
+ </message>
+ <message id="qtn_virtual">
+ <location filename="finddialog.cpp" line="81"/>
+ <source></source>
+ <extracomment>A message without source string</extracomment>
+ <translation></translation>
+ </message>
+</context>
+<context>
<name>FindDialog</name>
<message>
<source></source>
@@ -45,5 +65,10 @@
<numerusform></numerusform>
</translation>
</message>
+ <message id="new_id">
+ <location filename="finddialog.cpp" line="77"/>
+ <source>this is just some text</source>
+ <translation type="unfinished">Unfertige Uebersetzung</translation>
+ </message>
</context>
</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp
index e1464a2..9abb367 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp
@@ -148,4 +148,7 @@ void FindDialog::doFind(bool forward)
bool FindDialog::hasFindExpression() const
{
// statusMessage(tr( "Should be obsolete" ));
+
+ //% "This is some random text"
+ qtTrId("keep_id")
}
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
index 834f512..feab169 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
@@ -1,6 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="1.1">
<context>
+ <name></name>
+ <message id="keep_id">
+ <location filename="finddialog.cpp" line="153"/>
+ <source>This is some random text</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="obsolete_id">
+ <location filename="finddialog.cpp" line="155"/>
+ <source>Should be obsolete, too</source>
+ <translation type="unfinished">SHOULD BE OBSOLETE AS WELL</translation>
+ </message>
+</context>
+<context>
<name>FindDialog</name>
<message>
<location filename="finddialog.cpp" line="85"/>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result
index b328e90..ee3d0f6 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result
@@ -2,6 +2,14 @@
<!DOCTYPE TS>
<TS version="2.0">
<context>
+ <name></name>
+ <message id="keep_id">
+ <location filename="finddialog.cpp" line="153"/>
+ <source>This is some random text</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>FindDialog</name>
<message>
<location filename="finddialog.cpp" line="85"/>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp
index 7b28c75..cc3af48 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp
@@ -150,6 +150,9 @@ void FindDialog::doFind(bool forward)
bool FindDialog::hasFindExpression() const
{
+ //% "This is some random text"
+ qtTrId("keep_id")
+
return !findExpr.isEmpty();
}
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
index 1fa0fd3..2bc6049 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
@@ -1,6 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE TS><TS version="1.1">
<context>
+ <name></name>
+ <message id="keep_id">
+ <location filename="finddialog.cpp" line="154"/>
+ <source>This is some random text</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="obsolete_id">
+ <location filename="finddialog.cpp" line="155"/>
+ <source>Should be obsolete, too</source>
+ <translation type="unfinished">SHOULD BE OBSOLETE AS WELL</translation>
+ </message>
+</context>
+<context>
<name>FindDialog</name>
<message>
<location filename="finddialog.cpp" line="85"/>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result
index cfd11b1..f442cbc 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result
@@ -2,6 +2,18 @@
<!DOCTYPE TS>
<TS version="2.0">
<context>
+ <name></name>
+ <message id="keep_id">
+ <location filename="finddialog.cpp" line="154"/>
+ <source>This is some random text</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message id="obsolete_id">
+ <source>Should be obsolete, too</source>
+ <translation type="obsolete">SHOULD BE OBSOLETE AS WELL</translation>
+ </message>
+</context>
+<context>
<name>FindDialog</name>
<message>
<source>Enter the text you are looking for.</source>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index e243e66..386d9b7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -247,3 +247,8 @@ class YetAnotherTest : QObject {
tr("nothing");
}
};
+
+
+
+//: This is a message without a source string
+QString test = qtTrId("yet_another_id");
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
index 26e5a65..6d50c21 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -18,6 +18,12 @@ backslashed \ stuff.</source>
</translation>
<extra-some>thing</extra-some>
</message>
+ <message id="yet_another_id">
+ <location filename="main.cpp" line="254"/>
+ <source></source>
+ <extracomment>This is a message without a source string</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Dialog2</name>
diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
index 7b9a422..715f219 100644
--- a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
+++ b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
@@ -77,7 +77,7 @@ private:
void tst_QAudioDeviceInfo::initTestCase()
{
// Only perform tests if audio output device exists!
- QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::deviceList(QAudio::AudioOutput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
if(devices.size() > 0)
available = true;
else {
@@ -90,7 +90,7 @@ void tst_QAudioDeviceInfo::checkAvailableDefaultInput()
{
// Only perform tests if audio input device exists!
bool storeAvailable = available;
- QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::deviceList(QAudio::AudioInput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
if(devices.size() > 0)
available = true;
else {
@@ -111,7 +111,7 @@ void tst_QAudioDeviceInfo::checkAvailableDefaultOutput()
void tst_QAudioDeviceInfo::outputList()
{
if(available) {
- QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::deviceList(QAudio::AudioOutput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
QVERIFY(devices.size() > 0);
device = new QAudioDeviceInfo(devices.at(0));
}
diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp
index 286e63f..0778a8e 100644
--- a/tests/auto/qaudioformat/tst_qaudioformat.cpp
+++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp
@@ -69,17 +69,20 @@ private slots:
void tst_QAudioFormat::checkNull()
{
- // Default constructed QAudioFormat is null.
+ // Default constructed QAudioFormat is invalid.
QAudioFormat audioFormat0;
- QVERIFY(audioFormat0.isNull());
+ QVERIFY(!audioFormat0.isValid());
- // Null is transferred
+ // validity is transferred
QAudioFormat audioFormat1(audioFormat0);
- QVERIFY(audioFormat1.isNull());
+ QVERIFY(!audioFormat1.isValid());
- // Null is voided on activity
audioFormat0.setFrequency(44100);
- QVERIFY(!audioFormat0.isNull());
+ audioFormat0.setChannels(2);
+ audioFormat0.setSampleSize(16);
+ audioFormat0.setCodec("audio/pcm");
+ audioFormat0.setSampleType(QAudioFormat::SignedInt);
+ QVERIFY(audioFormat0.isValid());
}
void tst_QAudioFormat::checkFrequency()
diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp
index 3efc346..744ce38 100644
--- a/tests/auto/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp
@@ -76,7 +76,7 @@ void tst_QAudioInput::initTestCase()
format.setSampleType(QAudioFormat::UnSignedInt);
// Only perform tests if audio input device exists!
- QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::deviceList(QAudio::AudioInput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
if(devices.size() > 0)
available = true;
else {
@@ -137,16 +137,16 @@ void tst_QAudioInput::pullFile()
QSignalSpy stateSignal(audio, SIGNAL(stateChanged(QAudio::State)));
// Always have default states, before start
- QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->state() == QAudio::StoppedState);
QVERIFY(audio->error() == QAudio::NoError);
- QVERIFY(audio->clock() == 0);
+ QVERIFY(audio->elapsedUSecs() == 0);
audio->start(&filename);
QTest::qWait(20);
// Check state and periodSize() are valid non-zero values.
QVERIFY(audio->state() == QAudio::ActiveState);
QVERIFY(audio->error() == QAudio::NoError);
- QVERIFY(audio->clock() > 10000 && audio->clock() < 800000);
+ QVERIFY(audio->elapsedUSecs() > 10000 && audio->elapsedUSecs() < 800000);
QVERIFY(audio->periodSize() > 0);
QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
@@ -154,12 +154,12 @@ void tst_QAudioInput::pullFile()
QTest::qWait(5000);
QVERIFY(readSignal.count() > 0);
- QVERIFY(audio->totalTime() > 0);
+ QVERIFY(audio->processedUSecs() > 0);
audio->stop();
QTest::qWait(20);
- QVERIFY(audio->state() == QAudio::StopState);
- QVERIFY(audio->clock() == 0);
+ QVERIFY(audio->state() == QAudio::StoppedState);
+ QVERIFY(audio->elapsedUSecs() == 0);
// Can only check to make sure we got at least 1 more signal, but can be more.
QVERIFY(stateSignal.count() > 1);
diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
index b001af1..26694cc 100644
--- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
@@ -79,7 +79,7 @@ void tst_QAudioOutput::initTestCase()
format.setSampleType(QAudioFormat::UnSignedInt);
// Only perform tests if audio output device exists!
- QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::deviceList(QAudio::AudioOutput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
if(devices.size() > 0)
available = true;
else {
@@ -140,9 +140,9 @@ void tst_QAudioOutput::pullFile()
audio->setNotifyInterval(100);
// Always have default states, before start
- QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->state() == QAudio::StoppedState);
QVERIFY(audio->error() == QAudio::NoError);
- QVERIFY(audio->clock() == 0);
+ QVERIFY(audio->elapsedUSecs() == 0);
audio->start(&file);
QTest::qWait(20); // wait 20ms
@@ -150,12 +150,12 @@ void tst_QAudioOutput::pullFile()
QVERIFY(audio->state() == QAudio::ActiveState);
QVERIFY(audio->error() == QAudio::NoError);
QVERIFY(audio->periodSize() > 0);
- QVERIFY(audio->clock() > 10000 && audio->clock() < 800000);
+ QVERIFY(audio->elapsedUSecs() > 10000 && audio->elapsedUSecs() < 800000);
QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
// Wait until finished...
QTestEventLoop::instance().enterLoop(1);
- QCOMPARE(audio->totalTime(), qint64(692250));
+ QCOMPARE(audio->processedUSecs(), qint64(692250));
#ifdef Q_OS_WINCE
// 4.wav is a little less than 700ms, so notify should fire 4 times on Wince!
@@ -166,8 +166,8 @@ void tst_QAudioOutput::pullFile()
#endif
audio->stop();
QTest::qWait(20); // wait 20ms
- QVERIFY(audio->state() == QAudio::StopState);
- QVERIFY(audio->clock() == 0);
+ QVERIFY(audio->state() == QAudio::StoppedState);
+ QVERIFY(audio->elapsedUSecs() == 0);
// Can only check to make sure we got at least 1 more signal, but can be more.
QVERIFY(stateSignal.count() > 1);
@@ -184,7 +184,7 @@ void tst_QAudioOutput::pushFile()
const qint64 fileSize = file.size();
- QIODevice* feed = audio->start(0);
+ QIODevice* feed = audio->start();
char* buffer = new char[fileSize];
file.read(buffer, fileSize);
@@ -199,7 +199,7 @@ void tst_QAudioOutput::pushFile()
QTestEventLoop::instance().enterLoop(1);
QVERIFY(written == fileSize);
- QVERIFY(audio->totalTime() == 692250);
+ QVERIFY(audio->processedUSecs() == 692250);
audio->stop();
file.close();
diff --git a/tests/auto/qdatastream/tst_qdatastream.cpp b/tests/auto/qdatastream/tst_qdatastream.cpp
index 56fc53a..7535645 100644
--- a/tests/auto/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/qdatastream/tst_qdatastream.cpp
@@ -1461,7 +1461,7 @@ void tst_QDataStream::readQImage(QDataStream *s)
QVERIFY(d12.width() == ref.width());
QVERIFY(d12.height() == ref.height());
QVERIFY(d12.depth() == ref.depth());
- QVERIFY(d12.numColors() == ref.numColors());
+ QVERIFY(d12.colorCount() == ref.colorCount());
#ifdef QT3_SUPPORT
QVERIFY(d12.hasAlphaBuffer() == ref.hasAlphaBuffer());
#else
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp
index 55cc286..b3d6fd9 100644
--- a/tests/auto/qfile/tst_qfile.cpp
+++ b/tests/auto/qfile/tst_qfile.cpp
@@ -91,6 +91,10 @@
#define STDERR_FILENO 2
#endif
+#ifndef QT_OPEN_BINARY
+#define QT_OPEN_BINARY 0
+#endif
+
Q_DECLARE_METATYPE(QFile::FileError)
//TESTED_CLASS=
@@ -211,6 +215,81 @@ public:
// disabled this test for the moment... it hangs
void invalidFile_data();
void invalidFile();
+
+private:
+ enum FileType { OpenQFile, OpenFd, OpenStream };
+
+ bool openFd(QFile &file, QIODevice::OpenMode mode)
+ {
+ int fdMode = QT_OPEN_LARGEFILE | QT_OPEN_BINARY;
+
+ // File will be truncated if in Write mode.
+ if (mode & QIODevice::WriteOnly)
+ fdMode |= QT_OPEN_WRONLY | QT_OPEN_TRUNC;
+ if (mode & QIODevice::ReadOnly)
+ fdMode |= QT_OPEN_RDONLY;
+
+ fd_ = QT_OPEN(qPrintable(file.fileName()), fdMode);
+
+ return (-1 != fd_) && file.open(fd_, mode);
+ }
+
+ bool openStream(QFile &file, QIODevice::OpenMode mode)
+ {
+ char const *streamMode = "";
+
+ // File will be truncated if in Write mode.
+ if (mode & QIODevice::WriteOnly)
+ streamMode = "wb+";
+ else if (mode & QIODevice::ReadOnly)
+ streamMode = "rb";
+
+ stream_ = QT_FOPEN(qPrintable(file.fileName()), streamMode);
+
+ return stream_ && file.open(stream_, mode);
+ }
+
+ bool openFile(QFile &file, QIODevice::OpenMode mode, FileType type = OpenQFile)
+ {
+ if (mode & QIODevice::WriteOnly && !file.exists())
+ {
+ // Make sure the file exists
+ QFile createFile(file.fileName());
+ if (!createFile.open(QIODevice::ReadWrite))
+ return false;
+ }
+
+ // Note: openFd and openStream will truncate the file if write mode.
+ switch (type)
+ {
+ case OpenQFile:
+ return file.open(mode);
+
+ case OpenFd:
+ return openFd(file, mode);
+
+ case OpenStream:
+ return openStream(file, mode);
+ }
+
+ return false;
+ }
+
+ void closeFile(QFile &file)
+ {
+ file.close();
+
+ if (-1 != fd_)
+ QT_CLOSE(fd_);
+ if (stream_)
+ ::fclose(stream_);
+
+ fd_ = -1;
+ stream_ = 0;
+ }
+
+ int fd_;
+ FILE *stream_;
};
tst_QFile::tst_QFile()
@@ -226,6 +305,8 @@ void tst_QFile::init()
{
// TODO: Add initialization code here.
// This will be executed immediately before each test is run.
+ fd_ = -1;
+ stream_ = 0;
}
void tst_QFile::cleanup()
@@ -254,6 +335,11 @@ void tst_QFile::cleanup()
QFile::remove("existing-file.txt");
QFile::remove("file-renamed-once.txt");
QFile::remove("file-renamed-twice.txt");
+
+ if (-1 != fd_)
+ QT_CLOSE(fd_);
+ if (stream_)
+ ::fclose(stream_);
}
void tst_QFile::initTestCase()
@@ -1958,53 +2044,71 @@ void tst_QFile::fullDisk()
void tst_QFile::writeLargeDataBlock_data()
{
QTest::addColumn<QString>("fileName");
+ QTest::addColumn<int>("type");
+
+ QTest::newRow("localfile-QFile") << "./largeblockfile.txt" << (int)OpenQFile;
+ QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd;
+ QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream;
- QTest::newRow("localfile") << QString("./largeblockfile.txt");
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Some semi-randomness to avoid collisions.
QTest::newRow("unc file")
<< QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt")
.arg(QHostInfo::localHostName())
- .arg(QTime::currentTime().msec());
+ .arg(QTime::currentTime().msec()) << (int)OpenQFile;
#endif
}
-void tst_QFile::writeLargeDataBlock()
+static QByteArray getLargeDataBlock()
{
- QFETCH(QString, fileName);
+ static QByteArray array;
- // Generate a 64MB array with well defined contents.
- QByteArray array;
+ if (array.isNull())
+ {
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
- int resizeSize = 1024 * 1024; // WinCE and Symbian do not have much space
+ int resizeSize = 1024 * 1024; // WinCE and Symbian do not have much space
#else
- int resizeSize = 64 * 1024 * 1024;
+ int resizeSize = 64 * 1024 * 1024;
#endif
- array.resize(resizeSize);
- for (int i = 0; i < array.size(); ++i)
- array[i] = uchar(i);
+ array.resize(resizeSize);
+ for (int i = 0; i < array.size(); ++i)
+ array[i] = uchar(i);
+ }
- // Remove and open the target file
- QFile file(fileName);
- file.remove();
- if (file.open(QFile::WriteOnly)) {
- QCOMPARE(file.write(array), qint64(array.size()));
- file.close();
- QVERIFY(file.open(QFile::ReadOnly));
- array.clear();
- array = file.readAll();
- file.remove();
- } else {
- QFAIL(qPrintable(QString("Couldn't open file for writing: [%1]").arg(fileName)));
- }
- // Check that we got the right content
- QCOMPARE(array.size(), resizeSize);
- for (int i = 0; i < array.size(); ++i) {
- if (array[i] != char(i)) {
- QFAIL(qPrintable(QString("Wrong contents! Char at %1 = %2, expected %3")
- .arg(i).arg(int(uchar(array[i]))).arg(int(uchar(i)))));
- }
+ return array;
+}
+
+void tst_QFile::writeLargeDataBlock()
+{
+ QFETCH(QString, fileName);
+ QFETCH( int, type );
+
+ QByteArray const originalData = getLargeDataBlock();
+
+ {
+ QFile file(fileName);
+
+ QVERIFY2( openFile(file, QIODevice::WriteOnly, (FileType)type),
+ qPrintable(QString("Couldn't open file for writing: [%1]").arg(fileName)) );
+ QCOMPARE( file.write(originalData), (qint64)originalData.size() );
+ QVERIFY( file.flush() );
+
+ closeFile(file);
+ }
+
+ QByteArray readData;
+
+ {
+ QFile file(fileName);
+
+ QVERIFY2( openFile(file, QIODevice::ReadOnly, (FileType)type),
+ qPrintable(QString("Couldn't open file for reading: [%1]").arg(fileName)) );
+ readData = file.readAll();
+ closeFile(file);
}
+
+ QCOMPARE( readData, originalData );
+ QVERIFY( QFile::remove(fileName) );
}
void tst_QFile::readFromWriteOnlyFile()
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index b40cf43..d216924 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -49,6 +49,7 @@
#include <QtGui/qstyleoption.h>
#include "../../shared/util.h"
+#include <private/qgraphicseffect_p.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -131,16 +132,16 @@ public:
int margin() const
{ return m_margin; }
- void draw(QPainter *painter, QGraphicsEffectSource *source)
+ void draw(QPainter *painter)
{
++numRepaints;
if (doNothingInDraw)
return;
- m_source = source;
+ m_source = source();
m_painter = painter;
- m_styleOption = source->styleOption();
+ m_styleOption = source()->styleOption();
m_opacity = painter->opacity();
- source->draw(painter);
+ drawSource(painter);
}
void sourceChanged(QGraphicsEffect::ChangeFlags flags)
diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index 55294d5..9991ab4 100644
--- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -46,6 +46,8 @@
#include <QtGui/qgraphicsitem.h>
#include <QtGui/qstyleoption.h>
+#include <private/qgraphicseffect_p.h>
+
//TESTED_CLASS=
//TESTED_FILES=
@@ -54,13 +56,12 @@ class CustomItem : public QGraphicsRectItem
public:
CustomItem(qreal x, qreal y, qreal width, qreal height)
: QGraphicsRectItem(x, y, width, height), numRepaints(0),
- m_painter(0), m_styleOption(0)
+ m_painter(0)
{}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
m_painter = painter;
- m_styleOption = option;
++numRepaints;
QGraphicsRectItem::paint(painter, option, widget);
}
@@ -69,12 +70,10 @@ public:
{
numRepaints = 0;
m_painter = 0;
- m_styleOption = 0;
}
int numRepaints;
QPainter *m_painter;
- const QStyleOption *m_styleOption;
};
class CustomEffect : public QGraphicsEffect
@@ -84,7 +83,7 @@ public:
: QGraphicsEffect(), numRepaints(0), m_margin(10), m_sourceChanged(false),
m_sourceBoundingRectChanged(false), doNothingInDraw(false),
storeDeviceDependentStuff(false),
- m_painter(0), m_styleOption(0), m_source(0)
+ m_painter(0), m_source(0)
{}
QRectF boundingRectFor(const QRectF &rect) const
@@ -96,7 +95,6 @@ public:
m_sourceChanged = false;
m_sourceBoundingRectChanged = false;
m_painter = 0;
- m_styleOption = 0;
m_source = 0;
deviceCoordinatesPixmap = QPixmap();
deviceRect = QRect();
@@ -112,20 +110,19 @@ public:
int margin() const
{ return m_margin; }
- void draw(QPainter *painter, QGraphicsEffectSource *source)
+ void draw(QPainter *painter)
{
++numRepaints;
if (storeDeviceDependentStuff) {
- deviceCoordinatesPixmap = source->pixmap(Qt::DeviceCoordinates);
- deviceRect = source->deviceRect();
- sourceDeviceBoundingRect = source->boundingRect(Qt::DeviceCoordinates);
+ deviceCoordinatesPixmap = source()->pixmap(Qt::DeviceCoordinates);
+ deviceRect = QRect(0, 0, painter->device()->width(), painter->device()->height());
+ sourceDeviceBoundingRect = source()->boundingRect(Qt::DeviceCoordinates);
}
if (doNothingInDraw)
return;
- m_source = source;
+ m_source = source();
m_painter = painter;
- m_styleOption = source->styleOption();
- source->draw(painter);
+ source()->draw(painter);
}
void sourceChanged()
@@ -141,7 +138,6 @@ public:
bool doNothingInDraw;
bool storeDeviceDependentStuff;
QPainter *m_painter;
- const QStyleOption *m_styleOption;
QGraphicsEffectSource *m_source;
QPixmap deviceCoordinatesPixmap;
QRect deviceRect;
@@ -227,8 +223,6 @@ void tst_QGraphicsEffectSource::styleOption()
QTest::qWait(50);
QCOMPARE(item->numRepaints, 1);
QCOMPARE(effect->numRepaints, 1);
- QVERIFY(effect->m_styleOption);
- QCOMPARE(effect->m_styleOption, item->m_styleOption);
}
void tst_QGraphicsEffectSource::isPixmap()
@@ -291,10 +285,6 @@ void tst_QGraphicsEffectSource::boundingRect()
void tst_QGraphicsEffectSource::deviceRect()
{
- QTest::ignoreMessage(QtWarningMsg, "QGraphicsEffectSource::deviceRect: Not yet implemented, lacking device context");
- QCOMPARE(effect->source()->deviceRect(), QRect());
-
- // We can at least check that the rect was correct in QGraphicsEffect::draw.
effect->storeDeviceDependentStuff = true;
effect->source()->update();
QTest::qWait(50);
@@ -332,13 +322,13 @@ public:
return src.adjusted(-10, -10, 10, 10);
}
- void draw(QPainter *, QGraphicsEffectSource *source) {
- pix = source->pixmap(coordinateMode, &offset, padMode);
+ void draw(QPainter *) {
+ pix = source()->pixmap(coordinateMode, &offset, padMode);
}
QPixmap pix;
QPoint offset;
- QGraphicsEffectSource::PixmapPadMode padMode;
+ QGraphicsEffect::PixmapPadMode padMode;
Qt::CoordinateSystem coordinateMode;
};
@@ -351,32 +341,32 @@ void tst_QGraphicsEffectSource::pixmapPadding_data()
QTest::addColumn<uint>("ulPixel");
QTest::newRow("log,nopad") << int(Qt::LogicalCoordinates)
- << int(QGraphicsEffectSource::NoExpandPadMode)
+ << int(QGraphicsEffect::NoPad)
<< QSize(10, 10) << QPoint(0, 0)
<< 0xffff0000u;
QTest::newRow("log,transparent") << int(Qt::LogicalCoordinates)
- << int(QGraphicsEffectSource::ExpandToTransparentBorderPadMode)
+ << int(QGraphicsEffect::PadToTransparentBorder)
<< QSize(14, 14) << QPoint(-2, -2)
<< 0x00000000u;
QTest::newRow("log,effectrect") << int(Qt::LogicalCoordinates)
- << int(QGraphicsEffectSource::ExpandToEffectRectPadMode)
+ << int(QGraphicsEffect::PadToEffectiveBoundingRect)
<< QSize(30, 30) << QPoint(-10, -10)
<< 0x00000000u;
QTest::newRow("dev,nopad") << int(Qt::DeviceCoordinates)
- << int(QGraphicsEffectSource::NoExpandPadMode)
+ << int(QGraphicsEffect::NoPad)
<< QSize(20, 20) << QPoint(40, 40)
<< 0xffff0000u;
QTest::newRow("dev,transparent") << int(Qt::DeviceCoordinates)
- << int(QGraphicsEffectSource::ExpandToTransparentBorderPadMode)
+ << int(QGraphicsEffect::PadToTransparentBorder)
<< QSize(24, 24) << QPoint(38, 38)
<< 0x00000000u;
QTest::newRow("dev,effectrect") << int(Qt::DeviceCoordinates)
- << int(QGraphicsEffectSource::ExpandToEffectRectPadMode)
+ << int(QGraphicsEffect::PadToEffectiveBoundingRect)
<< QSize(40, 40) << QPoint(30, 30)
<< 0x00000000u;
@@ -404,7 +394,7 @@ void tst_QGraphicsEffectSource::pixmapPadding()
QFETCH(QSize, size);
QFETCH(uint, ulPixel);
- effect->padMode = (QGraphicsEffectSource::PixmapPadMode) padMode;
+ effect->padMode = (QGraphicsEffect::PixmapPadMode) padMode;
effect->coordinateMode = (Qt::CoordinateSystem) coordinateMode;
scene->render(&dummyPainter, scene->itemsBoundingRect(), scene->itemsBoundingRect());
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index e15ae8a..da4e85d 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -104,7 +104,7 @@ private slots:
void setPixel_data();
void setPixel();
- void setNumColors();
+ void setColorCount();
void setColor();
void rasterClipping();
@@ -155,7 +155,7 @@ void tst_QImage::create()
#endif
//QImage image(7000000, 7000000, 8, 256, QImage::IgnoreEndian);
QImage image(7000000, 7000000, QImage::Format_Indexed8);
- image.setNumColors(256);
+ image.setColorCount(256);
cr = !image.isNull();
#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE)
} catch (...) {
@@ -242,7 +242,7 @@ void tst_QImage::convertBitOrder()
QSKIP("Qt compiled without Qt3Support", SkipAll);
#else
QImage i(9,5,1,2,QImage::LittleEndian);
- qMemSet(i.bits(), 0, i.numBytes());
+ qMemSet(i.bits(), 0, i.byteCount());
i.setDotsPerMeterX(9);
i.setDotsPerMeterY(5);
@@ -258,7 +258,7 @@ void tst_QImage::convertBitOrder()
QVERIFY(i.dotsPerMeterY() == ni.dotsPerMeterY());
QVERIFY(i.depth() == ni.depth());
QVERIFY(i.size() == ni.size());
- QVERIFY(i.numColors() == ni.numColors());
+ QVERIFY(i.colorCount() == ni.colorCount());
#endif
}
@@ -365,7 +365,7 @@ void tst_QImage::setAlphaChannel()
QImage alphaChannel;
if (gray) {
alphaChannel = QImage(width, height, QImage::Format_Indexed8);
- alphaChannel.setNumColors(256);
+ alphaChannel.setColorCount(256);
for (int i=0; i<256; ++i)
alphaChannel.setColor(i, qRgb(i, i, i));
alphaChannel.fill(alpha);
@@ -927,7 +927,7 @@ void tst_QImage::rotate()
original.fill(qRgb(255,255,255));
if (format == QImage::Format_Indexed8) {
- original.setNumColors(256);
+ original.setColorCount(256);
for (int i = 0; i < 255; ++i)
original.setColor(i, qRgb(0, i, i));
}
@@ -1196,23 +1196,23 @@ void tst_QImage::convertToFormatPreserveText()
}
#endif // QT_NO_IMAGE_TEXT
-void tst_QImage::setNumColors()
+void tst_QImage::setColorCount()
{
QImage img(0, 0, QImage::Format_Indexed8);
- QTest::ignoreMessage(QtWarningMsg, "QImage::setNumColors: null image");
- img.setNumColors(256);
- QCOMPARE(img.numColors(), 0);
+ QTest::ignoreMessage(QtWarningMsg, "QImage::setColorCount: null image");
+ img.setColorCount(256);
+ QCOMPARE(img.colorCount(), 0);
}
void tst_QImage::setColor()
{
QImage img(0, 0, QImage::Format_Indexed8);
img.setColor(0, qRgba(18, 219, 108, 128));
- QCOMPARE(img.numColors(), 0);
+ QCOMPARE(img.colorCount(), 0);
QImage img2(1, 1, QImage::Format_Indexed8);
img2.setColor(0, qRgba(18, 219, 108, 128));
- QCOMPARE(img2.numColors(), 1);
+ QCOMPARE(img2.colorCount(), 1);
}
/* Just some sanity checking that we don't draw outside the buffer of
diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp
index 584a060..ab5572d 100644
--- a/tests/auto/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp
@@ -546,7 +546,7 @@ void tst_QImageWriter::saveWithNoFormat()
QFETCH(QImageWriter::ImageWriterError, error);
QImage niceImage(64, 64, QImage::Format_ARGB32);
- qMemSet(niceImage.bits(), 0, niceImage.numBytes());
+ qMemSet(niceImage.bits(), 0, niceImage.byteCount());
QImageWriter writer(fileName /* , 0 - no format! */);
if (error != 0) {
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
index 426887d..a2770d4 100644
--- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
@@ -877,7 +877,7 @@ void tst_QItemDelegate::decoration()
}
case QVariant::Image: {
QImage img(size, QImage::Format_Mono);
- qMemSet(img.bits(), 0, img.numBytes());
+ qMemSet(img.bits(), 0, img.byteCount());
value = img;
break;
}
diff --git a/tests/auto/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/qlcdnumber/tst_qlcdnumber.cpp
index c18ce24..3f52c70 100644
--- a/tests/auto/qlcdnumber/tst_qlcdnumber.cpp
+++ b/tests/auto/qlcdnumber/tst_qlcdnumber.cpp
@@ -74,14 +74,14 @@ tst_QLCDNumber::~tst_QLCDNumber()
void tst_QLCDNumber::getSetCheck()
{
QLCDNumber obj1;
- // int QLCDNumber::numDigits()
- // void QLCDNumber::setNumDigits(int)
- obj1.setNumDigits(0);
- QCOMPARE(0, obj1.numDigits());
- obj1.setNumDigits(INT_MIN);
- QCOMPARE(0, obj1.numDigits()); // Range<0, 99>
- obj1.setNumDigits(INT_MAX);
- QCOMPARE(99, obj1.numDigits()); // Range<0, 99>
+ // int QLCDNumber::digitCount()
+ // void QLCDNumber::setDigitCount(int)
+ obj1.setDigitCount(0);
+ QCOMPARE(0, obj1.digitCount());
+ obj1.setDigitCount(INT_MIN);
+ QCOMPARE(0, obj1.digitCount()); // Range<0, 99>
+ obj1.setDigitCount(INT_MAX);
+ QCOMPARE(99, obj1.digitCount()); // Range<0, 99>
}
QTEST_MAIN(tst_QLCDNumber)
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index ab7b0ac..5ead049 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -587,14 +587,16 @@ void tst_QLocalSocket::readBufferOverflow()
char buffer[dataBufferSize];
memset(buffer, 0, dataBufferSize);
serverSocket->write(buffer, dataBufferSize);
- serverSocket->flush();
+ serverSocket->waitForBytesWritten();
+ // wait until the first 128 bytes are ready to read
QVERIFY(client.waitForReadyRead());
QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize));
-#if defined(QT_LOCALSOCKET_TCP) || defined(Q_OS_SYMBIAN)
- QTest::qWait(250);
-#endif
+ // wait until the second 128 bytes are ready to read
+ QVERIFY(client.waitForReadyRead());
QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize));
+ // no more bytes available
+ QVERIFY(client.bytesAvailable() == 0);
}
// QLocalSocket/Server can take a name or path, check that it works as expected
diff --git a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
index 3c4ddd4..94857d7 100644
--- a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -234,7 +234,7 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("path-with-utf8-2") << "a=b;path=/R%C3%A9sum%C3%A9" << cookie;
cookie.setPath(QString());
- cookie.setDomain(".qt.nokia.com");
+ cookie.setDomain("qt.nokia.com");
QTest::newRow("plain-domain1") << "a=b;domain=qt.nokia.com" << cookie;
QTest::newRow("plain-domain2") << "a=b; domain=qt.nokia.com " << cookie;
QTest::newRow("plain-domain3") << "a=b;domain=QT.NOKIA.COM" << cookie;
@@ -247,32 +247,25 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("dot-domain4") << "a=b; Domain = .QT.NOKIA.COM" << cookie;
cookie.setDomain(QString::fromUtf8(".d\303\270gn\303\245pent.troll.no"));
- QTest::newRow("idn-domain1") << "a=b;domain=xn--dgnpent-gxa2o.troll.no" << cookie;
- QTest::newRow("idn-domain2") << "a=b;domain=d\303\270gn\303\245pent.troll.no" << cookie;
- QTest::newRow("idn-domain3") << "a=b;domain=XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
- QTest::newRow("idn-domain4") << "a=b;domain=D\303\230GN\303\205PENT.troll.NO" << cookie;
- QTest::newRow("idn-domain5") << "a=b;domain = D\303\230GN\303\205PENT.troll.NO" << cookie;
-
- cookie.setDomain(QString::fromUtf8(".d\303\270gn\303\245pent.troll.no"));
- QTest::newRow("dot-idn-domain1") << "a=b;domain=.xn--dgnpent-gxa2o.troll.no" << cookie;
- QTest::newRow("dot-idn-domain2") << "a=b;domain=.d\303\270gn\303\245pent.troll.no" << cookie;
- QTest::newRow("dot-idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
- QTest::newRow("dot-idn-domain4") << "a=b;domain=.D\303\230GN\303\205PENT.troll.NO" << cookie;
+ QTest::newRow("idn-domain1") << "a=b;domain=.xn--dgnpent-gxa2o.troll.no" << cookie;
+ QTest::newRow("idn-domain2") << "a=b;domain=.d\303\270gn\303\245pent.troll.no" << cookie;
+ QTest::newRow("idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
+ QTest::newRow("idn-domain4") << "a=b;domain=.D\303\230GN\303\205PENT.troll.NO" << cookie;
cookie.setDomain(".qt.nokia.com");
cookie.setPath("/");
- QTest::newRow("two-fields") << "a=b;domain=qt.nokia.com;path=/" << cookie;
- QTest::newRow("two-fields2") << "a=b; domain=qt.nokia.com; path=/" << cookie;
- QTest::newRow("two-fields3") << "a=b; domain=qt.nokia.com ; path=/ " << cookie;
- QTest::newRow("two-fields4") << "a=b;path=/; domain=qt.nokia.com" << cookie;
- QTest::newRow("two-fields5") << "a=b; path=/ ; domain=qt.nokia.com" << cookie;
- QTest::newRow("two-fields6") << "a=b; path= / ; domain =qt.nokia.com" << cookie;
+ QTest::newRow("two-fields") << "a=b;domain=.qt.nokia.com;path=/" << cookie;
+ QTest::newRow("two-fields2") << "a=b; domain=.qt.nokia.com; path=/" << cookie;
+ QTest::newRow("two-fields3") << "a=b; domain=.qt.nokia.com ; path=/ " << cookie;
+ QTest::newRow("two-fields4") << "a=b;path=/; domain=.qt.nokia.com" << cookie;
+ QTest::newRow("two-fields5") << "a=b; path=/ ; domain=.qt.nokia.com" << cookie;
+ QTest::newRow("two-fields6") << "a=b; path= / ; domain =.qt.nokia.com" << cookie;
cookie.setSecure(true);
- QTest::newRow("three-fields") << "a=b;domain=qt.nokia.com;path=/;secure" << cookie;
- QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=qt.nokia.com" << cookie;
- QTest::newRow("three-fields3") << "a=b;secure;domain=qt.nokia.com; path=/" << cookie;
- QTest::newRow("three-fields4") << "a = b;secure;domain=qt.nokia.com; path=/" << cookie;
+ QTest::newRow("three-fields") << "a=b;domain=.qt.nokia.com;path=/;secure" << cookie;
+ QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=.qt.nokia.com" << cookie;
+ QTest::newRow("three-fields3") << "a=b;secure;domain=.qt.nokia.com; path=/" << cookie;
+ QTest::newRow("three-fields4") << "a = b;secure;domain=.qt.nokia.com; path=/" << cookie;
cookie = QNetworkCookie();
cookie.setName("a");
@@ -664,7 +657,7 @@ void tst_QNetworkCookie::parseMultipleCookies_data()
cookie.setName("baz");
cookie.setDomain(".qt.nokia.com");
list.prepend(cookie);
- QTest::newRow("complex-2") << "baz=bar; path=/; domain=qt.nokia.com, c=d,a=,foo=bar; path=/" << list;
+ QTest::newRow("complex-2") << "baz=bar; path=/; domain=.qt.nokia.com, c=d,a=,foo=bar; path=/" << list;
// cookies obtained from the network:
cookie = QNetworkCookie("id", "51706646077999719");
diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 9b9c56a..ff7e78e 100644
--- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -120,7 +120,7 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
cookie.setName("a");
cookie.setPath("/");
- cookie.setDomain("www.foo.tld");
+ cookie.setDomain(".foo.tld");
result += cookie;
QTest::newRow("just-add") << preset << cookie << "http://www.foo.tld" << result << true;
@@ -148,6 +148,20 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
cookie.setPath("/");
QTest::newRow("diff-path-order") << preset << cookie << "http://www.foo.tld" << result << true;
+ preset.clear();
+ result.clear();
+ QNetworkCookie finalCookie = cookie;
+ cookie.setDomain("foo.tld");
+ finalCookie.setDomain(".foo.tld");
+ result += finalCookie;
+ QTest::newRow("should-add-dot-prefix") << preset << cookie << "http://www.foo.tld" << result << true;
+
+ result.clear();
+ cookie.setDomain("");
+ finalCookie.setDomain("www.foo.tld");
+ result += finalCookie;
+ QTest::newRow("should-set-default-domain") << preset << cookie << "http://www.foo.tld" << result << true;
+
// security test:
result.clear();
preset.clear();
@@ -159,7 +173,7 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << false;
// setting the defaults:
- QNetworkCookie finalCookie = cookie;
+ finalCookie = cookie;
finalCookie.setPath("/something/");
cookie.setPath("");
cookie.setDomain("");
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 7adb67f..0b61dcd 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -227,12 +227,6 @@ private Q_SLOTS:
void rateControl_data();
void rateControl();
- void downloadPerformance();
- void uploadPerformance();
- void performanceControlRate();
- void httpUploadPerformance();
- void httpDownloadPerformance_data();
- void httpDownloadPerformance();
void downloadProgress_data();
void downloadProgress();
@@ -413,93 +407,6 @@ public slots:
}
};
-class FixedSizeDataGenerator : public QIODevice
-{
- Q_OBJECT
- enum { Idle, Started, Stopped } state;
-public:
- FixedSizeDataGenerator(qint64 size) : state(Idle)
- { open(ReadOnly | Unbuffered);
- toBeGeneratedTotalCount = toBeGeneratedCount = size;
- }
-
- virtual qint64 bytesAvailable() const
- {
- return state == Started ? toBeGeneratedCount + QIODevice::bytesAvailable() : 0;
- }
-
- virtual bool isSequential() const{
- return false;
- }
-
- virtual bool reset() const{
- return false;
- }
-
- qint64 size() const {
- return toBeGeneratedTotalCount;
- }
-
-public slots:
- void start() { state = Started; emit readyRead(); }
-
-protected:
- virtual qint64 readData(char *data, qint64 maxlen)
- {
- memset(data, '@', maxlen);
-
- if (toBeGeneratedCount <= 0) {
- return -1;
- }
-
- qint64 n = qMin(maxlen, toBeGeneratedCount);
- toBeGeneratedCount -= n;
-
- if (toBeGeneratedCount <= 0) {
- // make sure this is a queued connection!
- emit readChannelFinished();
- }
-
- return n;
- }
- virtual qint64 writeData(const char *, qint64)
- { return -1; }
-
- qint64 toBeGeneratedCount;
- qint64 toBeGeneratedTotalCount;
-};
-
-
-class DataGenerator: public QIODevice
-{
- Q_OBJECT
- enum { Idle, Started, Stopped } state;
-public:
- DataGenerator() : state(Idle)
- { open(ReadOnly); }
-
- virtual bool isSequential() const { return true; }
- virtual qint64 bytesAvailable() const { return state == Started ? 1024*1024 : 0; }
-
-public slots:
- void start() { state = Started; emit readyRead(); }
- void stop() { state = Stopped; emit readyRead(); }
-
-protected:
- virtual qint64 readData(char *data, qint64 maxlen)
- {
- if (state == Stopped)
- return -1; // EOF
-
- // return as many bytes as are wanted
- memset(data, '@', maxlen);
- return maxlen;
- }
- virtual qint64 writeData(const char *, qint64)
- { return -1; }
-};
-
-
class SocketPair: public QObject
{
@@ -692,255 +599,6 @@ protected:
}
};
-class TimedSender: public QThread
-{
- Q_OBJECT
- qint64 totalBytes;
- QSemaphore ready;
- QByteArray dataToSend;
- QTcpSocket *client;
- int timeout;
- int port;
-public:
- int transferRate;
- TimedSender(int ms)
- : totalBytes(0), timeout(ms), port(-1), transferRate(-1)
- {
- dataToSend = QByteArray(16*1024, '@');
- start();
- ready.acquire();
- }
-
- inline int serverPort() const { return port; }
-
-private slots:
- void writeMore()
- {
- while (client->bytesToWrite() < 128 * 1024) {
- writePacket(dataToSend);
- }
- }
-
-protected:
- void run()
- {
- QTcpServer server;
- server.listen();
- port = server.serverPort();
- ready.release();
-
- server.waitForNewConnection(-1);
- client = server.nextPendingConnection();
-
- writeMore();
- connect(client, SIGNAL(bytesWritten(qint64)), SLOT(writeMore()), Qt::DirectConnection);
-
- QEventLoop eventLoop;
- QTimer::singleShot(timeout, &eventLoop, SLOT(quit()));
-
- QTime timer;
- timer.start();
- eventLoop.exec();
- disconnect(client, SIGNAL(bytesWritten(qint64)), this, 0);
-
- // wait for the connection to shut down
- client->disconnectFromHost();
- if (!client->waitForDisconnected(10000))
- return;
-
- transferRate = totalBytes * 1000 / timer.elapsed();
- qDebug() << "TimedSender::run" << "receive rate:" << (transferRate / 1024) << "kB/s in"
- << timer.elapsed() << "ms";
- }
-
- void writePacket(const QByteArray &array)
- {
- client->write(array);
- totalBytes += array.size();
- }
-};
-
-class ThreadedDataReader: public QThread
-{
- Q_OBJECT
- // used to make the constructor only return after the tcp server started listening
- QSemaphore ready;
- QTcpSocket *client;
- int timeout;
- int port;
-public:
- qint64 transferRate;
- ThreadedDataReader()
- : port(-1), transferRate(-1)
- {
- start();
- ready.acquire();
- }
-
- inline int serverPort() const { return port; }
-
-protected:
- void run()
- {
- QTcpServer server;
- server.listen();
- port = server.serverPort();
- ready.release();
-
- server.waitForNewConnection(-1);
- client = server.nextPendingConnection();
-
- QEventLoop eventLoop;
- DataReader reader(client, false);
- QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
-
- QTime timer;
- timer.start();
- eventLoop.exec();
- qint64 elapsed = timer.elapsed();
-
- transferRate = reader.totalBytes * 1000 / elapsed;
- qDebug() << "ThreadedDataReader::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
- }
-};
-
-class ThreadedDataReaderHttpServer: public QThread
-{
- Q_OBJECT
- // used to make the constructor only return after the tcp server started listening
- QSemaphore ready;
- QTcpSocket *client;
- int timeout;
- int port;
-public:
- qint64 transferRate;
- ThreadedDataReaderHttpServer()
- : port(-1), transferRate(-1)
- {
- start();
- ready.acquire();
- }
-
- inline int serverPort() const { return port; }
-
-protected:
- void run()
- {
- QTcpServer server;
- server.listen();
- port = server.serverPort();
- ready.release();
-
- server.waitForNewConnection(-1);
- client = server.nextPendingConnection();
- client->write("HTTP/1.0 200 OK\r\n");
- client->write("Content-length: 0\r\n");
- client->write("\r\n");
- client->flush();
-
- QCoreApplication::processEvents();
-
- QEventLoop eventLoop;
- DataReader reader(client, false);
- QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
-
- QTime timer;
- timer.start();
- eventLoop.exec();
- qint64 elapsed = timer.elapsed();
-
- transferRate = reader.totalBytes * 1000 / elapsed;
- qDebug() << "ThreadedDataReaderHttpServer::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
- }
-};
-
-class HttpDownloadPerformanceClient : QObject {
- Q_OBJECT;
- QIODevice *device;
- public:
- HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){
- connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
- }
-
- public slots:
- void readyReadSlot() {
- device->readAll();
- }
-
-};
-
-class HttpDownloadPerformanceServer : QObject {
- Q_OBJECT;
- qint64 dataSize;
- qint64 dataSent;
- QTcpServer server;
- QTcpSocket *client;
- bool serverSendsContentLength;
- bool chunkedEncoding;
-
-public:
- HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0),
- client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) {
- server.listen();
- connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot()));
- }
-
- int serverPort() {
- return server.serverPort();
- }
-
-public slots:
-
- void newConnectionSlot() {
- client = server.nextPendingConnection();
- client->setParent(this);
- connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
- connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64)));
- }
-
- void readyReadSlot() {
- client->readAll();
- client->write("HTTP/1.0 200 OK\n");
- if (serverSendsContentLength)
- client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii());
- if (chunkedEncoding)
- client->write(QString("Transfer-Encoding: chunked\n").toAscii());
- client->write("Connection: close\n\n");
- }
-
- void bytesWrittenSlot(qint64 amount) {
- Q_UNUSED(amount);
- if (dataSent == dataSize && client) {
- // close eventually
-
- // chunked encoding: we have to send a last "empty" chunk
- if (chunkedEncoding)
- client->write(QString("0\r\n\r\n").toAscii());
-
- client->disconnectFromHost();
- server.close();
- client = 0;
- return;
- }
-
- // send data
- if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) {
- qint64 amount = qMin(qint64(16*1024), dataSize - dataSent);
- QByteArray data(amount, '@');
-
- if (chunkedEncoding) {
- client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii());
- client->write(data.constData(), amount);
- client->write(QString("\r\n").toAscii());
- } else {
- client->write(data.constData(), amount);
- }
-
- dataSent += amount;
- }
- }
-};
-
tst_QNetworkReply::tst_QNetworkReply()
{
@@ -3311,7 +2969,6 @@ void tst_QNetworkReply::ioPostToHttpEmtpyUploadProgress()
server.close();
}
-
void tst_QNetworkReply::rateControl_data()
{
QTest::addColumn<int>("rate");
@@ -3365,142 +3022,6 @@ void tst_QNetworkReply::rateControl()
QVERIFY(sender.transferRate <= maxRate);
}
-void tst_QNetworkReply::downloadPerformance()
-{
- // unlike the above function, this one tries to send as fast as possible
- // and measures how fast it was.
- TimedSender sender(5000);
- QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(sender.serverPort()) + "/?bare=1");
- QNetworkReplyPtr reply = manager.get(request);
- DataReader reader(reply, false);
-
- QTime loopTime;
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- loopTime.start();
- QTestEventLoop::instance().enterLoop(40);
- int elapsedTime = loopTime.elapsed();
- sender.wait();
-
- qint64 receivedBytes = reader.totalBytes;
- qDebug() << "tst_QNetworkReply::downloadPerformance" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
- << elapsedTime << "ms";
-}
-
-void tst_QNetworkReply::uploadPerformance()
-{
- ThreadedDataReader reader;
- DataGenerator generator;
-
-
- QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1");
- QNetworkReplyPtr reply = manager.put(request, &generator);
- generator.start();
- connect(&reader, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTimer::singleShot(5000, &generator, SLOT(stop()));
-
- QTestEventLoop::instance().enterLoop(30);
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QVERIFY(!QTestEventLoop::instance().timeout());
-}
-
-void tst_QNetworkReply::httpUploadPerformance()
-{
-#ifdef Q_OS_SYMBIAN
- // SHow some mercy for non-desktop platform/s
- enum {UploadSize = 4*1024*1024}; // 4 MB
-#else
- enum {UploadSize = 128*1024*1024}; // 128 MB
-#endif
- ThreadedDataReaderHttpServer reader;
- FixedSizeDataGenerator generator(UploadSize);
-
- QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1"));
- request.setHeader(QNetworkRequest::ContentLengthHeader,UploadSize);
-
- QNetworkReplyPtr reply = manager.put(request, &generator);
-
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QTime time;
- generator.start();
- time.start();
- QTestEventLoop::instance().enterLoop(40);
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- qint64 elapsed = time.elapsed();
- qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, "
- << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
-
- reader.exit();
- reader.wait();
-}
-
-
-void tst_QNetworkReply::performanceControlRate()
-{
- // this is a control comparison for the other two above
- // it does the same thing, but instead bypasses the QNetworkAccess system
- qDebug() << "The following are the maximum transfer rates that we can get in this system"
- " (bypassing QNetworkAccess)";
-
- TimedSender sender(5000);
- QTcpSocket sink;
- sink.connectToHost("127.0.0.1", sender.serverPort());
- DataReader reader(&sink, false);
-
- QTime loopTime;
- connect(&sink, SIGNAL(disconnected()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- loopTime.start();
- QTestEventLoop::instance().enterLoop(40);
- int elapsedTime = loopTime.elapsed();
- sender.wait();
-
- qint64 receivedBytes = reader.totalBytes;
- qDebug() << "tst_QNetworkReply::performanceControlRate" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
- << elapsedTime << "ms";
-}
-
-void tst_QNetworkReply::httpDownloadPerformance_data()
-{
- QTest::addColumn<bool>("serverSendsContentLength");
- QTest::addColumn<bool>("chunkedEncoding");
-
- QTest::newRow("Server sends no Content-Length") << false << false;
- QTest::newRow("Server sends Content-Length") << true << false;
- QTest::newRow("Server uses chunked encoding") << false << true;
-
-}
-
-void tst_QNetworkReply::httpDownloadPerformance()
-{
- QFETCH(bool, serverSendsContentLength);
- QFETCH(bool, chunkedEncoding);
-#ifdef Q_OS_SYMBIAN
- // Show some mercy to non-desktop platform/s
- enum {UploadSize = 4*1024*1024}; // 4 MB
-#else
- enum {UploadSize = 128*1024*1024}; // 128 MB
-#endif
- HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
-
- QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
- QNetworkReplyPtr reply = manager.get(request);
-
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
- HttpDownloadPerformanceClient client(reply);
-
- QTime time;
- time.start();
- QTestEventLoop::instance().enterLoop(40);
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- qint64 elapsed = time.elapsed();
- qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, "
- << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
-}
-
void tst_QNetworkReply::downloadProgress_data()
{
QTest::addColumn<int>("loopCount");
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 4d2c626..8b71349 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -101,6 +101,8 @@ private slots:
void saveAndRestore_data();
void saveAndRestore();
+ void drawBorderPixmap();
+
void drawLine_data();
void drawLine();
void drawLine_clipped();
@@ -973,6 +975,18 @@ void tst_QPainter::initFrom()
delete widget;
}
+void tst_QPainter::drawBorderPixmap()
+{
+ QPixmap src(79,79);
+ src.fill(Qt::transparent);
+
+ QImage pm(200,200,QImage::Format_RGB32);
+ QPainter p(&pm);
+ p.setTransform(QTransform(-1,0,0,-1,173.5,153.5));
+ qDrawBorderPixmap(&p, QRect(0,0,75,105), QMargins(39,39,39,39), src, QRect(0,0,79,79), QMargins(39,39,39,39),
+ QTileRules(Qt::StretchTile,Qt::StretchTile), 0);
+}
+
void tst_QPainter::drawLine_data()
{
QTest::addColumn<QLine>("line");
@@ -2918,7 +2932,7 @@ void tst_QPainter::monoImages()
QImage img(2, 2, format);
- if (img.numColors() > 0) {
+ if (img.colorCount() > 0) {
img.setColor(0, QColor(colorPairs[j][0]).rgba());
img.setColor(1, QColor(colorPairs[j][1]).rgba());
}
@@ -2940,7 +2954,7 @@ void tst_QPainter::monoImages()
// should not change the image
QCOMPARE(original, img);
- if (img.numColors() == 0)
+ if (img.colorCount() == 0)
continue;
for (int k = 0; k < 2; ++k) {
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 8e02c74..d7f042e 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -293,7 +293,7 @@ void tst_QPixmap::setAlphaChannel()
QRgb expected = alpha == 0 ? 0 : qRgba(red, green, blue, alpha);
for (int y = 0; y < height; ++y) {
for (int x = 0; x < width; ++x) {
- if (result.numColors() > 0) {
+ if (result.colorCount() > 0) {
ok &= result.pixelIndex(x, y) == expected;
} else {
ok &= result.pixel(x, y) == expected;
@@ -330,7 +330,7 @@ void tst_QPixmap::fromImage()
QImage image(37, 16, format);
- if (image.numColors() == 2) {
+ if (image.colorCount() == 2) {
image.setColor(0, QColor(Qt::color0).rgba());
image.setColor(1, QColor(Qt::color1).rgba());
}
@@ -731,7 +731,7 @@ void tst_QPixmap::testMetrics()
void tst_QPixmap::createMaskFromColor()
{
QImage image(3, 3, QImage::Format_Indexed8);
- image.setNumColors(10);
+ image.setColorCount(10);
image.setColor(0, 0xffffffff);
image.setColor(1, 0xff000000);
image.setColor(2, 0xffff0000);
diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp
index 86d831e..e305386 100644
--- a/tests/auto/qregexp/tst_qregexp.cpp
+++ b/tests/auto/qregexp/tst_qregexp.cpp
@@ -628,7 +628,7 @@ void tst_QRegExp::capturedTexts()
QRegExp rx7("([A-Za-z_])([A-Za-z_0-9]*)");
rx7.setCaseSensitivity(Qt::CaseSensitive);
rx7.setPatternSyntax(QRegExp::RegExp);
- QCOMPARE(rx7.numCaptures(), 2);
+ QCOMPARE(rx7.captureCount(), 2);
int pos = rx7.indexIn("(10 + delta4) * 32");
QCOMPARE(pos, 6);
@@ -1177,36 +1177,36 @@ void tst_QRegExp::prepareEngineOptimization()
QCOMPARE(rx1.capturedTexts(), QStringList() << "" << "" << "" << "");
QCOMPARE(rx1.matchedLength(), -1);
QCOMPARE(rx1.matchedLength(), -1);
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.exactMatch("foo"), true);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx1.pos(3), 2);
QCOMPARE(rx1.exactMatch("foo"), true);
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx1.pos(3), 2);
QRegExp rx2 = rx1;
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx1.pos(3), 2);
- QCOMPARE(rx2.numCaptures(), 3);
+ QCOMPARE(rx2.captureCount(), 3);
QCOMPARE(rx2.matchedLength(), 3);
QCOMPARE(rx2.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx2.pos(3), 2);
QCOMPARE(rx1.exactMatch("fo"), true);
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 2);
QCOMPARE(rx1.capturedTexts(), QStringList() << "fo" << "f" << "o" << "");
QCOMPARE(rx1.pos(2), 1);
@@ -1245,25 +1245,25 @@ void tst_QRegExp::prepareEngineOptimization()
rx11.setPatternSyntax(QRegExp::Wildcard);
QVERIFY(!rx11.isValid());
- QCOMPARE(rx11.numCaptures(), 0);
+ QCOMPARE(rx11.captureCount(), 0);
QCOMPARE(rx11.matchedLength(), -1);
rx11.setPatternSyntax(QRegExp::RegExp);
QVERIFY(!rx11.isValid());
- QCOMPARE(rx11.numCaptures(), 0);
+ QCOMPARE(rx11.captureCount(), 0);
QCOMPARE(rx11.matchedLength(), -1);
rx11.setPattern("(foo)");
QVERIFY(rx11.isValid());
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), -1);
QCOMPARE(rx11.indexIn("ofoo"), 1);
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), 3);
rx11.setPatternSyntax(QRegExp::RegExp);
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), 3);
/*
@@ -1278,11 +1278,11 @@ void tst_QRegExp::prepareEngineOptimization()
QCOMPARE(rx11.matchedLength(), 3);
rx11.setPatternSyntax(QRegExp::Wildcard);
- QCOMPARE(rx11.numCaptures(), 0);
+ QCOMPARE(rx11.captureCount(), 0);
QCOMPARE(rx11.matchedLength(), -1);
rx11.setPatternSyntax(QRegExp::RegExp);
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), -1);
}
diff --git a/tests/auto/qregion/tst_qregion.cpp b/tests/auto/qregion/tst_qregion.cpp
index e5a3151..582b5e8 100644
--- a/tests/auto/qregion/tst_qregion.cpp
+++ b/tests/auto/qregion/tst_qregion.cpp
@@ -88,8 +88,8 @@ private slots:
void operator_xor_data();
void operator_xor();
- void numRects_data();
- void numRects();
+ void rectCount_data();
+ void rectCount();
void isEmpty_data();
void isEmpty();
@@ -554,7 +554,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(r1 + r2, expected);
- if (r2.numRects() == 1) {
+ if (r2.rectCount() == 1) {
if (r1 + r2.boundingRect() != expected) {
qDebug() << "r1 + QRect(r2)" << (r1 + r2.boundingRect());
qDebug() << "expected" << expected;
@@ -567,7 +567,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(r2 + r1, expected);
- if (r1.numRects() == 1) {
+ if (r1.rectCount() == 1) {
if (r1 + r2.boundingRect() != expected) {
qDebug() << "r2 + QRect(r1)" << (r2 + r1.boundingRect());
qDebug() << "expected" << expected;
@@ -582,7 +582,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(result1, expected);
- if (r2.numRects() == 1) {
+ if (r2.rectCount() == 1) {
result1 = r1;
result1 += r2.boundingRect();
if (result1 != expected) {
@@ -599,7 +599,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(result2, expected);
- if (r1.numRects() == 1) {
+ if (r1.rectCount() == 1) {
result2 = r2;
result2 += r1.boundingRect();
if (result2 != expected) {
@@ -802,7 +802,7 @@ void tst_QRegion::operator_xor()
QCOMPARE(dest, expected);
}
-void tst_QRegion::numRects_data()
+void tst_QRegion::rectCount_data()
{
QTest::addColumn<QRegion>("region");
QTest::addColumn<int>("expected");
@@ -818,12 +818,12 @@ void tst_QRegion::numRects_data()
QTest::newRow("2 rects") << dest << rects.size();
}
-void tst_QRegion::numRects()
+void tst_QRegion::rectCount()
{
QFETCH(QRegion, region);
QFETCH(int, expected);
- QCOMPARE(region.numRects(), expected);
+ QCOMPARE(region.rectCount(), expected);
}
void tst_QRegion::isEmpty_data()
@@ -850,7 +850,7 @@ void tst_QRegion::isEmpty()
QVERIFY(region.isEmpty());
QCOMPARE(region, QRegion());
- QCOMPARE(region.numRects(), 0);
+ QCOMPARE(region.rectCount(), 0);
QCOMPARE(region.boundingRect(), QRect());
QVERIFY(region.rects().isEmpty());
}
diff --git a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp
index aeead15..ddd5579 100644
--- a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp
+++ b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp
@@ -313,30 +313,127 @@ void tst_QScopedPointer::objectSize()
QCOMPARE(sizeof(QScopedPointer<int>), sizeof(void *));
}
-void tst_QScopedPointer::comparison()
+struct RefCounted
{
- int *a = new int(42);
- int *b = new int(43);
+ RefCounted()
+ : ref(0)
+ {
+ instanceCount.ref();
+ }
+
+ RefCounted(RefCounted const &other)
+ : ref(0)
+ {
+ instanceCount.ref();
+ }
+
+ ~RefCounted()
+ {
+ QVERIFY( ref == 0 );
+ instanceCount.deref();
+ }
+
+ RefCounted &operator=(RefCounted const &)
+ {
+ }
- QScopedPointer<int> pa(a);
- QScopedPointer<int> pa2(a);
- QScopedPointer<int> pb(b);
+ QAtomicInt ref;
+ static QAtomicInt instanceCount;
+};
+
+QAtomicInt RefCounted::instanceCount = 0;
+
+template <class A1, class A2, class B>
+void scopedPointerComparisonTest(const A1 &a1, const A2 &a2, const B &b)
+{
// test equality on equal pointers
- QVERIFY(pa == pa2);
- QVERIFY(pa2 == pa);
+ QVERIFY(a1 == a2);
+ QVERIFY(a2 == a1);
+
+ // test inequality on equal pointers
+ QVERIFY(!(a1 != a2));
+ QVERIFY(!(a2 != a1));
+
+ // test equality on unequal pointers
+ QVERIFY(!(a1 == b));
+ QVERIFY(!(a2 == b));
+ QVERIFY(!(b == a1));
+ QVERIFY(!(b == a2));
+
+ // test inequality on unequal pointers
+ QVERIFY(b != a1);
+ QVERIFY(b != a2);
+ QVERIFY(a1 != b);
+ QVERIFY(a2 != b);
+}
+
+void tst_QScopedPointer::comparison()
+{
+ QCOMPARE( int(RefCounted::instanceCount), 0 );
+
+ {
+ RefCounted *a = new RefCounted;
+ RefCounted *b = new RefCounted;
+
+ QCOMPARE( int(RefCounted::instanceCount), 2 );
- // test unequality on equal pointers
- QVERIFY(!(pa != pa2));
- QVERIFY(!(pa2 != pa));
+ QScopedPointer<RefCounted> pa1(a);
+ QScopedPointer<RefCounted> pa2(a);
+ QScopedPointer<RefCounted> pb(b);
- // test on unequal pointers
- QVERIFY(!(pa == pb));
- QVERIFY(!(pb == pa));
- QVERIFY(pb != pa);
- QVERIFY(pa != pb);
+ scopedPointerComparisonTest(pa1, pa1, pb);
+ scopedPointerComparisonTest(pa2, pa2, pb);
+ scopedPointerComparisonTest(pa1, pa2, pb);
+
+ pa2.take();
+
+ QCOMPARE( int(RefCounted::instanceCount), 2 );
+ }
+
+ QCOMPARE( int(RefCounted::instanceCount), 0 );
+
+ {
+ RefCounted *a = new RefCounted[42];
+ RefCounted *b = new RefCounted[43];
+
+ QCOMPARE( int(RefCounted::instanceCount), 85 );
+
+ QScopedArrayPointer<RefCounted> pa1(a);
+ QScopedArrayPointer<RefCounted> pa2(a);
+ QScopedArrayPointer<RefCounted> pb(b);
+
+ scopedPointerComparisonTest(pa1, pa2, pb);
+
+ pa2.take();
+
+ QCOMPARE( int(RefCounted::instanceCount), 85 );
+ }
+
+ QCOMPARE( int(RefCounted::instanceCount), 0 );
+
+ {
+ // QScopedSharedPointer is an internal helper class -- it is unsupported!
+
+ RefCounted *a = new RefCounted;
+ RefCounted *b = new RefCounted;
+
+ QCOMPARE( int(RefCounted::instanceCount), 2 );
+
+ QSharedDataPointer<RefCounted> pa1(a);
+ QSharedDataPointer<RefCounted> pa2(a);
+ QSharedDataPointer<RefCounted> pb(b);
+
+ QCOMPARE( int(a->ref), 2 );
+ QCOMPARE( int(b->ref), 1 );
+ QCOMPARE( int(RefCounted::instanceCount), 2 );
+
+ scopedPointerComparisonTest(pa1, pa2, pb);
+
+ QCOMPARE( int(RefCounted::instanceCount), 2 );
+ }
- pa2.take();
+ QCOMPARE( int(RefCounted::instanceCount), 0 );
}
QTEST_MAIN(tst_QScopedPointer)
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 804534f..8eaad78 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -4485,7 +4485,7 @@ void tst_QScriptEngine::qRegExpInport()
QScriptValue result = func.call(QScriptValue(), QScriptValueList() << string << rexp);
rx.indexIn(string);
- for (int i = 0; i <= rx.numCaptures(); i++) {
+ for (int i = 0; i <= rx.captureCount(); i++) {
QCOMPARE(result.property(i).toString(), rx.cap(i));
}
}
diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp
index 5237438..1d54409 100644
--- a/tests/auto/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp
@@ -1721,21 +1721,21 @@ void tst_QTextDocument::capitalizationHtmlInExport()
const QString smallcaps = doc->toHtml();
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("font-variant:small-caps;"));
cf.setFontCapitalization(QFont::AllUppercase);
cursor.mergeCharFormat(cf);
const QString uppercase = doc->toHtml();
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("text-transform:uppercase;"));
cf.setFontCapitalization(QFont::AllLowercase);
cursor.mergeCharFormat(cf);
const QString lowercase = doc->toHtml();
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("text-transform:lowercase;"));
doc->setHtml(smallcaps);
@@ -1761,14 +1761,14 @@ void tst_QTextDocument::wordspacingHtmlExport()
cursor.mergeCharFormat(cf);
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("word-spacing:4px;"));
cf.setFontWordSpacing(-8.5);
cursor.mergeCharFormat(cf);
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("word-spacing:-8.5px;"));
}
diff --git a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
index 993db52..1d50013 100644
--- a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
@@ -46,11 +46,397 @@
#include <QtNetwork/qnetworkreply.h>
#include <QtNetwork/qnetworkrequest.h>
#include <QtNetwork/qnetworkaccessmanager.h>
+#include <QtNetwork/qtcpsocket.h>
+#include <QtNetwork/qtcpserver.h>
#include "../../auto/network-settings.h"
+
+class TimedSender: public QThread
+{
+ Q_OBJECT
+ qint64 totalBytes;
+ QSemaphore ready;
+ QByteArray dataToSend;
+ QTcpSocket *client;
+ int timeout;
+ int port;
+public:
+ int transferRate;
+ TimedSender(int ms)
+ : totalBytes(0), timeout(ms), port(-1), transferRate(-1)
+ {
+ dataToSend = QByteArray(16*1024, '@');
+ start();
+ ready.acquire();
+ }
+
+ inline int serverPort() const { return port; }
+
+private slots:
+ void writeMore()
+ {
+ while (client->bytesToWrite() < 128 * 1024) {
+ writePacket(dataToSend);
+ }
+ }
+
+protected:
+ void run()
+ {
+ QTcpServer server;
+ server.listen();
+ port = server.serverPort();
+ ready.release();
+
+ server.waitForNewConnection(-1);
+ client = server.nextPendingConnection();
+
+ writeMore();
+ connect(client, SIGNAL(bytesWritten(qint64)), SLOT(writeMore()), Qt::DirectConnection);
+
+ QEventLoop eventLoop;
+ QTimer::singleShot(timeout, &eventLoop, SLOT(quit()));
+
+ QTime timer;
+ timer.start();
+ eventLoop.exec();
+ disconnect(client, SIGNAL(bytesWritten(qint64)), this, 0);
+
+ // wait for the connection to shut down
+ client->disconnectFromHost();
+ if (!client->waitForDisconnected(10000))
+ return;
+
+ transferRate = totalBytes * 1000 / timer.elapsed();
+ qDebug() << "TimedSender::run" << "receive rate:" << (transferRate / 1024) << "kB/s in"
+ << timer.elapsed() << "ms";
+ }
+
+ void writePacket(const QByteArray &array)
+ {
+ client->write(array);
+ totalBytes += array.size();
+ }
+};
+
+
+class QNetworkReplyPtr: public QSharedPointer<QNetworkReply>
+{
+public:
+ inline QNetworkReplyPtr(QNetworkReply *ptr = 0)
+ : QSharedPointer<QNetworkReply>(ptr)
+ { }
+
+ inline operator QNetworkReply *() const { return data(); }
+};
+
+
+class DataReader: public QObject
+{
+ Q_OBJECT
+public:
+ qint64 totalBytes;
+ QByteArray data;
+ QIODevice *device;
+ bool accumulate;
+ DataReader(QIODevice *dev, bool acc = true) : totalBytes(0), device(dev), accumulate(acc)
+ {
+ connect(device, SIGNAL(readyRead()), SLOT(doRead()));
+ }
+
+public slots:
+ void doRead()
+ {
+ QByteArray buffer;
+ buffer.resize(device->bytesAvailable());
+ qint64 bytesRead = device->read(buffer.data(), device->bytesAvailable());
+ if (bytesRead == -1) {
+ QTestEventLoop::instance().exitLoop();
+ return;
+ }
+ buffer.truncate(bytesRead);
+ totalBytes += bytesRead;
+
+ if (accumulate)
+ data += buffer;
+ }
+};
+
+class ThreadedDataReader: public QThread
+{
+ Q_OBJECT
+ // used to make the constructor only return after the tcp server started listening
+ QSemaphore ready;
+ QTcpSocket *client;
+ int timeout;
+ int port;
+public:
+ qint64 transferRate;
+ ThreadedDataReader()
+ : port(-1), transferRate(-1)
+ {
+ start();
+ ready.acquire();
+ }
+
+ inline int serverPort() const { return port; }
+
+protected:
+ void run()
+ {
+ QTcpServer server;
+ server.listen();
+ port = server.serverPort();
+ ready.release();
+
+ server.waitForNewConnection(-1);
+ client = server.nextPendingConnection();
+
+ QEventLoop eventLoop;
+ DataReader reader(client, false);
+ QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
+
+ QTime timer;
+ timer.start();
+ eventLoop.exec();
+ qint64 elapsed = timer.elapsed();
+
+ transferRate = reader.totalBytes * 1000 / elapsed;
+ qDebug() << "ThreadedDataReader::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
+ }
+};
+
+class DataGenerator: public QIODevice
+{
+ Q_OBJECT
+ enum { Idle, Started, Stopped } state;
+public:
+ DataGenerator() : state(Idle)
+ { open(ReadOnly); }
+
+ virtual bool isSequential() const { return true; }
+ virtual qint64 bytesAvailable() const { return state == Started ? 1024*1024 : 0; }
+
+public slots:
+ void start() { state = Started; emit readyRead(); }
+ void stop() { state = Stopped; emit readyRead(); }
+
+protected:
+ virtual qint64 readData(char *data, qint64 maxlen)
+ {
+ if (state == Stopped)
+ return -1; // EOF
+
+ // return as many bytes as are wanted
+ memset(data, '@', maxlen);
+ return maxlen;
+ }
+ virtual qint64 writeData(const char *, qint64)
+ { return -1; }
+};
+
+class ThreadedDataReaderHttpServer: public QThread
+{
+ Q_OBJECT
+ // used to make the constructor only return after the tcp server started listening
+ QSemaphore ready;
+ QTcpSocket *client;
+ int timeout;
+ int port;
+public:
+ qint64 transferRate;
+ ThreadedDataReaderHttpServer()
+ : port(-1), transferRate(-1)
+ {
+ start();
+ ready.acquire();
+ }
+
+ inline int serverPort() const { return port; }
+
+protected:
+ void run()
+ {
+ QTcpServer server;
+ server.listen();
+ port = server.serverPort();
+ ready.release();
+
+ server.waitForNewConnection(-1);
+ client = server.nextPendingConnection();
+ client->write("HTTP/1.0 200 OK\r\n");
+ client->write("Content-length: 0\r\n");
+ client->write("\r\n");
+ client->flush();
+
+ QCoreApplication::processEvents();
+
+ QEventLoop eventLoop;
+ DataReader reader(client, false);
+ QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
+
+ QTime timer;
+ timer.start();
+ eventLoop.exec();
+ qint64 elapsed = timer.elapsed();
+
+ transferRate = reader.totalBytes * 1000 / elapsed;
+ qDebug() << "ThreadedDataReaderHttpServer::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
+ }
+};
+
+
+class FixedSizeDataGenerator : public QIODevice
+{
+ Q_OBJECT
+ enum { Idle, Started, Stopped } state;
+public:
+ FixedSizeDataGenerator(qint64 size) : state(Idle)
+ { open(ReadOnly | Unbuffered);
+ toBeGeneratedTotalCount = toBeGeneratedCount = size;
+ }
+
+ virtual qint64 bytesAvailable() const
+ {
+ return state == Started ? toBeGeneratedCount + QIODevice::bytesAvailable() : 0;
+ }
+
+ virtual bool isSequential() const{
+ return false;
+ }
+
+ virtual bool reset() const{
+ return false;
+ }
+
+ qint64 size() const {
+ return toBeGeneratedTotalCount;
+ }
+
+public slots:
+ void start() { state = Started; emit readyRead(); }
+
+protected:
+ virtual qint64 readData(char *data, qint64 maxlen)
+ {
+ memset(data, '@', maxlen);
+
+ if (toBeGeneratedCount <= 0) {
+ return -1;
+ }
+
+ qint64 n = qMin(maxlen, toBeGeneratedCount);
+ toBeGeneratedCount -= n;
+
+ if (toBeGeneratedCount <= 0) {
+ // make sure this is a queued connection!
+ emit readChannelFinished();
+ }
+
+ return n;
+ }
+ virtual qint64 writeData(const char *, qint64)
+ { return -1; }
+
+ qint64 toBeGeneratedCount;
+ qint64 toBeGeneratedTotalCount;
+};
+
+class HttpDownloadPerformanceServer : QObject {
+ Q_OBJECT;
+ qint64 dataSize;
+ qint64 dataSent;
+ QTcpServer server;
+ QTcpSocket *client;
+ bool serverSendsContentLength;
+ bool chunkedEncoding;
+
+public:
+ HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0),
+ client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) {
+ server.listen();
+ connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot()));
+ }
+
+ int serverPort() {
+ return server.serverPort();
+ }
+
+public slots:
+
+ void newConnectionSlot() {
+ client = server.nextPendingConnection();
+ client->setParent(this);
+ connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
+ connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64)));
+ }
+
+ void readyReadSlot() {
+ client->readAll();
+ client->write("HTTP/1.0 200 OK\n");
+ if (serverSendsContentLength)
+ client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii());
+ if (chunkedEncoding)
+ client->write(QString("Transfer-Encoding: chunked\n").toAscii());
+ client->write("Connection: close\n\n");
+ }
+
+ void bytesWrittenSlot(qint64 amount) {
+ Q_UNUSED(amount);
+ if (dataSent == dataSize && client) {
+ // close eventually
+
+ // chunked encoding: we have to send a last "empty" chunk
+ if (chunkedEncoding)
+ client->write(QString("0\r\n\r\n").toAscii());
+
+ client->disconnectFromHost();
+ server.close();
+ client = 0;
+ return;
+ }
+
+ // send data
+ if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) {
+ qint64 amount = qMin(qint64(16*1024), dataSize - dataSent);
+ QByteArray data(amount, '@');
+
+ if (chunkedEncoding) {
+ client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii());
+ client->write(data.constData(), amount);
+ client->write(QString("\r\n").toAscii());
+ } else {
+ client->write(data.constData(), amount);
+ }
+
+ dataSent += amount;
+ }
+ }
+};
+
+class HttpDownloadPerformanceClient : QObject {
+ Q_OBJECT;
+ QIODevice *device;
+ public:
+ HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){
+ connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
+ }
+
+ public slots:
+ void readyReadSlot() {
+ device->readAll();
+ }
+
+};
+
+
+
+
class tst_qnetworkreply : public QObject
{
Q_OBJECT
+
+ QNetworkAccessManager manager;
private slots:
void httpLatency();
@@ -58,6 +444,14 @@ private slots:
void echoPerformance_data();
void echoPerformance();
#endif
+
+ void downloadPerformance();
+ void uploadPerformance();
+ void performanceControlRate();
+ void httpUploadPerformance();
+ void httpDownloadPerformance_data();
+ void httpDownloadPerformance();
+
};
void tst_qnetworkreply::httpLatency()
@@ -107,6 +501,142 @@ void tst_qnetworkreply::echoPerformance()
}
#endif
+void tst_qnetworkreply::downloadPerformance()
+{
+ // unlike the above function, this one tries to send as fast as possible
+ // and measures how fast it was.
+ TimedSender sender(5000);
+ QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(sender.serverPort()) + "/?bare=1");
+ QNetworkReplyPtr reply = manager.get(request);
+ DataReader reader(reply, false);
+
+ QTime loopTime;
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ loopTime.start();
+ QTestEventLoop::instance().enterLoop(40);
+ int elapsedTime = loopTime.elapsed();
+ sender.wait();
+
+ qint64 receivedBytes = reader.totalBytes;
+ qDebug() << "tst_QNetworkReply::downloadPerformance" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
+ << elapsedTime << "ms";
+}
+
+void tst_qnetworkreply::uploadPerformance()
+{
+ ThreadedDataReader reader;
+ DataGenerator generator;
+
+
+ QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1");
+ QNetworkReplyPtr reply = manager.put(request, &generator);
+ generator.start();
+ connect(&reader, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTimer::singleShot(5000, &generator, SLOT(stop()));
+
+ QTestEventLoop::instance().enterLoop(30);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+}
+
+void tst_qnetworkreply::httpUploadPerformance()
+{
+#ifdef Q_OS_SYMBIAN
+ // SHow some mercy for non-desktop platform/s
+ enum {UploadSize = 4*1024*1024}; // 4 MB
+#else
+ enum {UploadSize = 128*1024*1024}; // 128 MB
+#endif
+ ThreadedDataReaderHttpServer reader;
+ FixedSizeDataGenerator generator(UploadSize);
+
+ QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1"));
+ request.setHeader(QNetworkRequest::ContentLengthHeader,UploadSize);
+
+ QNetworkReplyPtr reply = manager.put(request, &generator);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ QTime time;
+ generator.start();
+ time.start();
+ QTestEventLoop::instance().enterLoop(40);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ qint64 elapsed = time.elapsed();
+ qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, "
+ << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
+
+ reader.exit();
+ reader.wait();
+}
+
+
+void tst_qnetworkreply::performanceControlRate()
+{
+ // this is a control comparison for the other two above
+ // it does the same thing, but instead bypasses the QNetworkAccess system
+ qDebug() << "The following are the maximum transfer rates that we can get in this system"
+ " (bypassing QNetworkAccess)";
+
+ TimedSender sender(5000);
+ QTcpSocket sink;
+ sink.connectToHost("127.0.0.1", sender.serverPort());
+ DataReader reader(&sink, false);
+
+ QTime loopTime;
+ connect(&sink, SIGNAL(disconnected()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ loopTime.start();
+ QTestEventLoop::instance().enterLoop(40);
+ int elapsedTime = loopTime.elapsed();
+ sender.wait();
+
+ qint64 receivedBytes = reader.totalBytes;
+ qDebug() << "tst_QNetworkReply::performanceControlRate" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
+ << elapsedTime << "ms";
+}
+
+void tst_qnetworkreply::httpDownloadPerformance_data()
+{
+ QTest::addColumn<bool>("serverSendsContentLength");
+ QTest::addColumn<bool>("chunkedEncoding");
+
+ QTest::newRow("Server sends no Content-Length") << false << false;
+ QTest::newRow("Server sends Content-Length") << true << false;
+ QTest::newRow("Server uses chunked encoding") << false << true;
+
+}
+
+void tst_qnetworkreply::httpDownloadPerformance()
+{
+ QFETCH(bool, serverSendsContentLength);
+ QFETCH(bool, chunkedEncoding);
+#ifdef Q_OS_SYMBIAN
+ // Show some mercy to non-desktop platform/s
+ enum {UploadSize = 4*1024*1024}; // 4 MB
+#else
+ enum {UploadSize = 128*1024*1024}; // 128 MB
+#endif
+ HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
+
+ QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ HttpDownloadPerformanceClient client(reply);
+
+ QTime time;
+ time.start();
+ QTestEventLoop::instance().enterLoop(40);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ qint64 elapsed = time.elapsed();
+ qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, "
+ << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
+}
+
QTEST_MAIN(tst_qnetworkreply)
#include "tst_qnetworkreply.moc"