#include <qtest.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
-#include <QtDeclarative/qsgview.h>
-#include <private/qsgflipable_p.h>
+#include <QtDeclarative/qquickview.h>
+#include <private/qquickflipable_p.h>
#include <private/qdeclarativevaluetype_p.h>
#include <QFontMetrics>
-#include <private/qsgrectangle_p.h>
+#include <private/qquickrectangle_p.h>
#include <math.h>
#include <QtOpenGL/QGLShaderProgram>
#include "../shared/util.h"
-class tst_qsgflipable : public QObject
+class tst_qquickflipable : public QObject
{
Q_OBJECT
public:
- tst_qsgflipable();
+ tst_qquickflipable();
private slots:
void initTestCase();
QDeclarativeEngine engine;
};
-tst_qsgflipable::tst_qsgflipable()
+tst_qquickflipable::tst_qquickflipable()
{
}
-void tst_qsgflipable::initTestCase()
+void tst_qquickflipable::initTestCase()
{
}
-void tst_qsgflipable::cleanupTestCase()
+void tst_qquickflipable::cleanupTestCase()
{
}
-void tst_qsgflipable::create()
+void tst_qquickflipable::create()
{
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml")));
- QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create());
+ QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create());
QVERIFY(obj != 0);
delete obj;
}
-void tst_qsgflipable::checkFrontAndBack()
+void tst_qquickflipable::checkFrontAndBack()
{
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml")));
- QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create());
+ QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create());
QVERIFY(obj != 0);
QVERIFY(obj->front() != 0);
delete obj;
}
-void tst_qsgflipable::setFrontAndBack()
+void tst_qquickflipable::setFrontAndBack()
{
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml")));
- QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create());
+ QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create());
QVERIFY(obj != 0);
QVERIFY(obj->front() != 0);
QString message = c.url().toString() + ":3:1: QML Flipable: front is a write-once property";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
- obj->setFront(new QSGRectangle());
+ obj->setFront(new QQuickRectangle());
message = c.url().toString() + ":3:1: QML Flipable: back is a write-once property";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
- obj->setBack(new QSGRectangle());
+ obj->setBack(new QQuickRectangle());
delete obj;
}
-void tst_qsgflipable::QTBUG_9161_crash()
+void tst_qquickflipable::QTBUG_9161_crash()
{
- QSGView *canvas = new QSGView;
+ QQuickView *canvas = new QQuickView;
canvas->setSource(QUrl::fromLocalFile(TESTDATA("crash.qml")));
- QSGItem *root = canvas->rootObject();
+ QQuickItem *root = canvas->rootObject();
QVERIFY(root != 0);
canvas->show();
delete canvas;
}
-void tst_qsgflipable::QTBUG_8474_qgv_abort()
+void tst_qquickflipable::QTBUG_8474_qgv_abort()
{
- QSGView *canvas = new QSGView;
+ QQuickView *canvas = new QQuickView;
canvas->setSource(QUrl::fromLocalFile(TESTDATA("flipable-abort.qml")));
- QSGItem *root = canvas->rootObject();
+ QQuickItem *root = canvas->rootObject();
QVERIFY(root != 0);
canvas->show();
delete canvas;
}
-QTEST_MAIN(tst_qsgflipable)
+QTEST_MAIN(tst_qquickflipable)
-#include "tst_qsgflipable.moc"
+#include "tst_qquickflipable.moc"