summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-23 00:33:52 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-23 00:33:52 (GMT)
commit6a3945d3ca3185c00597dcaefb93617620973ff5 (patch)
tree0534630f29a2d513621adf33c6fb25085fcab220 /tests
parent1690ad91cc9e686e688aa7832a16cbf2c9336948 (diff)
parent67e90b8a5701ef5b0653f012e74debc91e1b3b49 (diff)
downloadQt-6a3945d3ca3185c00597dcaefb93617620973ff5.zip
Qt-6a3945d3ca3185c00597dcaefb93617620973ff5.tar.gz
Qt-6a3945d3ca3185c00597dcaefb93617620973ff5.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp2
-rw-r--r--tests/auto/moc/error-on-wrong-notify.h53
-rw-r--r--tests/auto/moc/tst_moc.cpp22
-rw-r--r--tests/auto/qgl/tst_qgl.cpp3
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp8
-rw-r--r--tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp4
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp12
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp2
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp40
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp12
-rw-r--r--tests/auto/qmetaobject/tst_qmetaobject.cpp2
-rw-r--r--tests/auto/qpauseanimation/tst_qpauseanimation.cpp6
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp2
13 files changed, 133 insertions, 35 deletions
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index 4a945f3..20ccccb 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -636,7 +636,7 @@ void tst_QDeclarativeDebug::queryRootContexts()
QCOMPARE(context.objects()[0].properties().count(), 0);
QCOMPARE(context.objects()[0].children().count(), 0);
- QCOMPARE(context.contexts().count(), 1);
+ QCOMPARE(context.contexts().count(), 4);
QVERIFY(context.contexts()[0].debugId() >= 0);
QCOMPARE(context.contexts()[0].name(), QString("tst_QDeclarativeDebug_childContext"));
diff --git a/tests/auto/moc/error-on-wrong-notify.h b/tests/auto/moc/error-on-wrong-notify.h
new file mode 100644
index 0000000..4b6284a
--- /dev/null
+++ b/tests/auto/moc/error-on-wrong-notify.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 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 <QObject>
+
+class ClassWithWrongNOTIFY : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int foo READ foo WRITE setFoo NOTIFY fooChanged)
+
+ int m_foo;
+public:
+ void setFoo(int i) { m_foo = i; }
+ int foo() { return m_foo; }
+};
+
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp
index d3a7e03..f9c3ccb 100644
--- a/tests/auto/moc/tst_moc.cpp
+++ b/tests/auto/moc/tst_moc.cpp
@@ -492,6 +492,7 @@ private slots:
void warnOnVirtualSignal();
void QTBUG5590_dummyProperty();
void QTBUG12260_defaultTemplate();
+ void notifyError();
signals:
void sigWithUnsignedArg(unsigned foo);
void sigWithSignedArg(signed foo);
@@ -1362,6 +1363,27 @@ void tst_Moc::QTBUG12260_defaultTemplate()
QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doAnotherThing(bool,bool)") != -1);
}
+void tst_Moc::notifyError()
+{
+#ifdef MOC_CROSS_COMPILED
+ QSKIP("Not tested when cross-compiled", SkipAll);
+#endif
+#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)
+ QProcess proc;
+ proc.start("moc", QStringList(srcify("error-on-wrong-notify.h")));
+ QVERIFY(proc.waitForFinished());
+ QCOMPARE(proc.exitCode(), 1);
+ QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
+ QByteArray mocOut = proc.readAllStandardOutput();
+ QVERIFY(mocOut.isEmpty());
+ QString mocError = QString::fromLocal8Bit(proc.readAllStandardError());
+ QCOMPARE(mocError, QString(SRCDIR) +
+ QString("/error-on-wrong-notify.h:52: Error: NOTIFY signal 'fooChanged' of property 'foo' does not exist in class ClassWithWrongNOTIFY.\n"));
+#else
+ QSKIP("Only tested on linux/gcc", SkipAll);
+#endif
+}
+
QTEST_APPLESS_MAIN(tst_Moc)
#include "tst_moc.moc"
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 7fe461c..e411508 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -847,6 +847,7 @@ void tst_QGL::graphicsViewClipping()
scene.addWidget(widget)->setPos(0, 0);
QGraphicsView view(&scene);
+ view.setBackgroundBrush(Qt::white);
#ifdef Q_WS_QWS
view.setWindowFlags(Qt::FramelessWindowHint);
#endif
@@ -1835,7 +1836,7 @@ void tst_QGL::clipTest()
// Sample pixels in a grid pattern which avoids false failures due to
// off-by-one pixel errors on some buggy GL implementations
for (int x = 2; x < reference.width(); x += 5) {
- for (int y = 2; y < reference.width(); y += 5) {
+ for (int y = 2; y < reference.height(); y += 5) {
QFUZZY_COMPARE_PIXELS(widgetFB.pixel(x, y), reference.pixel(x, y));
}
}
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 5dc0c9d..fa6a5ec 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -183,20 +183,20 @@ void tst_QGraphicsEffect::source()
QGraphicsItem *item = new QGraphicsRectItem(0, 0, 10, 10);
item->setGraphicsEffect(effect);
QVERIFY(effect->source());
- QCOMPARE(effect->source()->graphicsItem(), item);
+ QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item);
QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceAttached);
effect->reset();
// Make sure disabling/enabling the effect doesn't change the source.
effect->setEnabled(false);
QVERIFY(effect->source());
- QCOMPARE(effect->source()->graphicsItem(), item);
+ QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item);
QVERIFY(!effect->m_sourceChangedFlags);
effect->reset();
effect->setEnabled(true);
QVERIFY(effect->source());
- QCOMPARE(effect->source()->graphicsItem(), item);
+ QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item);
QVERIFY(!effect->m_sourceChangedFlags);
effect->reset();
@@ -210,7 +210,7 @@ void tst_QGraphicsEffect::source()
item->setGraphicsEffect(effect);
QPointer<QGraphicsEffectSource> source = effect->source();
QVERIFY(source);
- QCOMPARE(source->graphicsItem(), item);
+ QCOMPARE(source->graphicsItem(), (const QGraphicsItem*)item);
delete item;
QVERIFY(!effect);
QVERIFY(!source);
diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index 49a76fa..af23b46 100644
--- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -209,7 +209,7 @@ void tst_QGraphicsEffectSource::init()
void tst_QGraphicsEffectSource::graphicsItem()
{
QVERIFY(effect->source());
- QCOMPARE(effect->source()->graphicsItem(), item);
+ QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item);
}
void tst_QGraphicsEffectSource::styleOption()
@@ -237,7 +237,7 @@ void tst_QGraphicsEffectSource::isPixmap()
CustomEffect *anotherEffect = new CustomEffect;
pixmapItem->setGraphicsEffect(anotherEffect);
QVERIFY(anotherEffect->source());
- QCOMPARE(anotherEffect->source()->graphicsItem(), static_cast<QGraphicsItem *>(pixmapItem));
+ QCOMPARE(anotherEffect->source()->graphicsItem(), static_cast<const QGraphicsItem *>(pixmapItem));
QVERIFY(anotherEffect->source()->isPixmap());
delete pixmapItem;
}
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 6cea834..411c790 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -788,7 +788,7 @@ void tst_QGraphicsProxyWidget::focusNextPrevChild()
view.show();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
if (hasScene) {
scene.addItem(proxy);
proxy->show();
@@ -837,7 +837,7 @@ void tst_QGraphicsProxyWidget::focusOutEvent()
view.setFocus();
QTest::qWaitForWindowShown(&view);
QTRY_VERIFY(view.isVisible());
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
QWidget *widget = new QWidget;
widget->setFocusPolicy(Qt::WheelFocus);
@@ -1093,7 +1093,7 @@ void tst_QGraphicsProxyWidget::keyPressEvent()
view.viewport()->setFocus();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget;
proxy->setFlag(QGraphicsItem::ItemIsFocusable, true); // ### remove me!!!
@@ -1134,7 +1134,7 @@ void tst_QGraphicsProxyWidget::keyReleaseEvent()
view.show();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget;
@@ -1178,7 +1178,7 @@ void tst_QGraphicsProxyWidget::mouseDoubleClickEvent()
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget;
proxy->setFlag(QGraphicsItem::ItemIsFocusable, true); // ### remove me!!!
@@ -3472,7 +3472,7 @@ void tst_QGraphicsProxyWidget::clickFocus()
qt_x11_wait_for_window_manager(&view);
#endif
QApplication::setActiveWindow(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
QVERIFY(!proxy->hasFocus());
QVERIFY(!proxy->widget()->hasFocus());
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 67a41ca..903977c 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1491,7 +1491,7 @@ void tst_QGraphicsScene::clear()
scene.setItemIndexMethod(QGraphicsScene::NoIndex);
scene.addItem(firstItem);
scene.addItem(secondItem);
- QCOMPARE(scene.items().at(0), firstItem);
+ QCOMPARE(scene.items().at(0), (QGraphicsItem*)firstItem);
QCOMPARE(scene.items().at(1), secondItem);
ClearTestItem *thirdItem = new ClearTestItem(firstItem);
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 1cce687..7b5ac7a 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -244,6 +244,9 @@ private slots:
void QTBUG_4151_clipAndIgnore();
void QTBUG_5859_exposedRect();
void QTBUG_7438_cursor();
+
+public slots:
+ void dummySlot() {}
};
void tst_QGraphicsView::initTestCase()
@@ -3202,14 +3205,18 @@ void tst_QGraphicsView::scrollAfterResize()
void tst_QGraphicsView::moveItemWhileScrolling_data()
{
QTest::addColumn<bool>("adjustForAntialiasing");
+ QTest::addColumn<bool>("changedConnected");
- QTest::newRow("no adjust") << false;
- QTest::newRow("adjust") << true;
+ QTest::newRow("no adjust") << false << false;
+ QTest::newRow("adjust") << true << false;
+ QTest::newRow("no adjust changedConnected") << false << true;
+ QTest::newRow("adjust changedConnected") << true << true;
}
void tst_QGraphicsView::moveItemWhileScrolling()
{
QFETCH(bool, adjustForAntialiasing);
+ QFETCH(bool, changedConnected);
class MoveItemScrollView : public QGraphicsView
{
@@ -3253,6 +3260,8 @@ void tst_QGraphicsView::moveItemWhileScrolling()
view.resize(200, 200);
view.painted = false;
view.show();
+ if (changedConnected)
+ QObject::connect(view.scene(), SIGNAL(changed(QList<QRectF>)), this, SLOT(dummySlot()));
QTest::qWaitForWindowShown(&view);
QApplication::processEvents();
QTRY_VERIFY(view.painted);
@@ -3691,24 +3700,32 @@ void tst_QGraphicsView::update2_data()
{
QTest::addColumn<qreal>("penWidth");
QTest::addColumn<bool>("antialiasing");
+ QTest::addColumn<bool>("changedConnected");
// Anti-aliased.
- QTest::newRow("pen width: 0.0, antialiasing: true") << 0.0 << true;
- QTest::newRow("pen width: 1.5, antialiasing: true") << 1.5 << true;
- QTest::newRow("pen width: 2.0, antialiasing: true") << 2.0 << true;
- QTest::newRow("pen width: 3.0, antialiasing: true") << 3.0 << true;
+ QTest::newRow("pen width: 0.0, antialiasing: true") << 0.0 << true << false;
+ QTest::newRow("pen width: 1.5, antialiasing: true") << 1.5 << true << false;
+ QTest::newRow("pen width: 2.0, antialiasing: true") << 2.0 << true << false;
+ QTest::newRow("pen width: 3.0, antialiasing: true") << 3.0 << true << false;
// Aliased.
- QTest::newRow("pen width: 0.0, antialiasing: false") << 0.0 << false;
- QTest::newRow("pen width: 1.5, antialiasing: false") << 1.5 << false;
- QTest::newRow("pen width: 2.0, antialiasing: false") << 2.0 << false;
- QTest::newRow("pen width: 3.0, antialiasing: false") << 3.0 << false;
+ QTest::newRow("pen width: 0.0, antialiasing: false") << 0.0 << false << false;
+ QTest::newRow("pen width: 1.5, antialiasing: false") << 1.5 << false << false;
+ QTest::newRow("pen width: 2.0, antialiasing: false") << 2.0 << false << false;
+ QTest::newRow("pen width: 3.0, antialiasing: false") << 3.0 << false << false;
+
+ // changed() connected
+ QTest::newRow("pen width: 0.0, antialiasing: false, changed") << 0.0 << false << true;
+ QTest::newRow("pen width: 1.5, antialiasing: true, changed") << 1.5 << true << true;
+ QTest::newRow("pen width: 2.0, antialiasing: false, changed") << 2.0 << false << true;
+ QTest::newRow("pen width: 3.0, antialiasing: true, changed") << 3.0 << true << true;
}
void tst_QGraphicsView::update2()
{
QFETCH(qreal, penWidth);
QFETCH(bool, antialiasing);
+ QFETCH(bool, changedConnected);
// Create a rect item.
const QRectF rawItemRect(-50.4, -50.3, 100.2, 100.1);
@@ -3719,6 +3736,9 @@ void tst_QGraphicsView::update2()
// Add item to a scene.
QGraphicsScene scene(-100, -100, 200, 200);
+ if (changedConnected)
+ QObject::connect(&scene, SIGNAL(changed(QList<QRectF>)), this, SLOT(dummySlot()));
+
scene.addItem(rect);
// Create a view on the scene.
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index bda22eb..e5628d1 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -890,7 +890,7 @@ void tst_QGraphicsWidget::initStyleOption()
qt_x11_wait_for_window_manager(&view);
#endif
QApplication::setActiveWindow(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
view.setAlignment(Qt::AlignTop | Qt::AlignLeft);
SubQGraphicsWidget *widget = new SubQGraphicsWidget;
@@ -1222,7 +1222,7 @@ void tst_QGraphicsWidget::setTabOrder()
qt_x11_wait_for_window_manager(&view);
#endif
QApplication::setActiveWindow(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
QGraphicsWidget *lastItem = 0;
QTest::ignoreMessage(QtWarningMsg, "QGraphicsWidget::setTabOrder(0, 0) is undefined");
@@ -1285,7 +1285,7 @@ void tst_QGraphicsWidget::setTabOrderAndReparent()
view.show();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
int i;
QGraphicsWidget *w1, *w2, *w3, *w4;
@@ -1425,7 +1425,7 @@ void tst_QGraphicsWidget::verifyFocusChain()
view.show();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
{
// parent/child focus
@@ -1552,7 +1552,7 @@ void tst_QGraphicsWidget::updateFocusChainWhenChildDie()
qt_x11_wait_for_window_manager(&view);
#endif
QApplication::setActiveWindow(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
// delete item in focus chain with no focus and verify chain
SubQGraphicsWidget *parent = new SubQGraphicsWidget(0, Qt::Window);
@@ -2503,7 +2503,7 @@ void tst_QGraphicsWidget::task250119_shortcutContext()
view.setScene(&scene);
view.show();
QApplication::setActiveWindow(&view);
- QTRY_COMPARE(QApplication::activeWindow(), &view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
// *** Event: ***
diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp
index bb96da1..8c2a0f9 100644
--- a/tests/auto/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp
@@ -107,7 +107,7 @@ class tst_QMetaObject : public QObject
Q_PROPERTY(QVariantList value5 WRITE setVal5 READ val5)
Q_PROPERTY(int value6 READ value6 NOTIFY value6Changed)
Q_PROPERTY(MyStruct value7 READ value7 WRITE setVal7 NOTIFY value7Changed)
- Q_PROPERTY(int value8 READ value8 NOTIFY value8Changed)
+ Q_PROPERTY(int value8 READ value8)
Q_PROPERTY(int value9 READ value9 CONSTANT)
Q_PROPERTY(int value10 READ value10 FINAL)
diff --git a/tests/auto/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/qpauseanimation/tst_qpauseanimation.cpp
index e473176..605cee6 100644
--- a/tests/auto/qpauseanimation/tst_qpauseanimation.cpp
+++ b/tests/auto/qpauseanimation/tst_qpauseanimation.cpp
@@ -280,7 +280,7 @@ void tst_QPauseAnimation::sequentialPauseGroup()
QVERIFY(group.state() == QAbstractAnimation::Running);
QVERIFY(animation1.state() == QAbstractAnimation::Stopped);
- QCOMPARE(&animation2, group.currentAnimation());
+ QCOMPARE((QAbstractAnimation*)&animation2, group.currentAnimation());
QVERIFY(animation2.state() == QAbstractAnimation::Running);
QVERIFY(animation3.state() == QAbstractAnimation::Stopped);
@@ -292,7 +292,7 @@ void tst_QPauseAnimation::sequentialPauseGroup()
QVERIFY(group.state() == QAbstractAnimation::Running);
QVERIFY(animation1.state() == QAbstractAnimation::Stopped);
QVERIFY(animation2.state() == QAbstractAnimation::Stopped);
- QCOMPARE(&animation3, group.currentAnimation());
+ QCOMPARE((QAbstractAnimation*)&animation3, group.currentAnimation());
QVERIFY(animation3.state() == QAbstractAnimation::Running);
group.setCurrentTime(750);
@@ -329,7 +329,7 @@ void tst_QPauseAnimation::sequentialGroupWithPause()
QVERIFY(group.state() == QAbstractAnimation::Running);
QVERIFY(animation.state() == QAbstractAnimation::Stopped);
- QCOMPARE(&pause, group.currentAnimation());
+ QCOMPARE((QAbstractAnimation*)&pause, group.currentAnimation());
QVERIFY(pause.state() == QAbstractAnimation::Running);
group.setCurrentTime(600);
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index e461b64..7e0f466 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -1558,6 +1558,8 @@ void tst_QPixmap::loadFromDataImage_data()
const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
#endif
QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png";
+ // When no extension is provided we try all extensions that has been registered by image providers
+ QTest::newRow("designer_argb32") << prefix + "/designer_argb32.png";
QTest::newRow("designer_indexed8_no_alpha.png") << prefix + "/designer_indexed8_no_alpha.png";
QTest::newRow("designer_indexed8_with_alpha.png") << prefix + "/designer_indexed8_with_alpha.png";
QTest::newRow("designer_rgb32.png") << prefix + "/designer_rgb32.png";