+CONFIG += testcase
TEMPLATE = app
TARGET = tst_animation
-QT += qml
+QT += qml testlib core-private gui-private qml-private quick-private v8-private
macx:CONFIG -= app_bundle
SOURCES += tst_animation.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-QT += testlib core-private gui-private qml-private quick-private v8-private
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QBENCHMARK {
QQmlJS::Engine engine;
- QQmlJS::NodePool nodePool(file, &engine);
QQmlJS::Lexer lexer(&engine);
lexer.setCode(code, -1);
QVERIFY(f.open(QIODevice::ReadOnly));
QByteArray data = f.readAll();
+ //TODO(pvarga): check preparseData
+ QByteArray preparseData;
QUrl url = QUrl::fromLocalFile(file);
+ QString urlString = url.toString();
QBENCHMARK {
QQmlScript::Parser parser;
- parser.parse(data, url);
+ parser.parse(data, preparseData, url, urlString);
parser.tree();
}
}
CONFIG += testcase
TEMPLATE = app
TARGET = tst_creation
+QT += core-private gui-private qml-private quick-private widgets testlib
macx:CONFIG -= app_bundle
SOURCES += tst_creation.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-QT += core-private gui-private qml-private qtquick1-private widgets testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
#include <QGraphicsItem>
#include <QQuickItem>
#include <QQmlContext>
-#include <QtQuick1/private/qdeclarativetextinput_p.h>
#include <private/qobject_p.h>
class tst_creation : public QObject
: QObject(parent) {}
QQmlListProperty<QObject> resources() {
- return QQmlListProperty<QObject>(this, 0, resources_append);
+ return QQmlListProperty<QObject>(this, 0, resources_append, 0, 0, 0);
}
static void resources_append(QQmlListProperty<QObject> *p, QObject *o) {
tst_creation::tst_creation()
{
qmlRegisterType<TestType>("Qt.test", 1, 0, "TestType");
-
- //get rid of initialization effects
- QDeclarative1TextInput te;
}
inline QUrl TEST_FILE(const QString &filename)
void tst_creation::itemtree_scene_cpp()
{
- QGraphicsScene scene;
QQuickItem *root = new QQuickItem;
- scene.addItem(root);
QBENCHMARK {
QQuickItem *item = new QQuickItem;
for (int i = 0; i < 30; ++i) {
qmlRegisterType<ScarceResourceProvider>("Qt.test", 1,0, "MyScarceResourceProvider");
qmlRegisterType<ArbitraryVariantProvider>("Qt.test", 1,0, "MyArbitraryVariantProvider");
- qmlRegisterSingletonType("Qt.test",1,0,script_api); // register (script) singleton Type for an existing uri which contains elements
- qmlRegisterSingletonType<testQObjectApi>("Qt.test",1,0,qobject_api); // register (qobject) for an existing uri for which another singleton Type was previously regd. Should replace!
- qmlRegisterSingletonType("Qt.test.scriptApi",1,0,script_api); // register (script) singleton Type for a uri which doesn't contain elements
- qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApi",1,0,qobject_api); // register (qobject) singleton Type for a uri which doesn't contain elements
- qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApi",1,3,qobject_api); // register (qobject) singleton Type for a uri which doesn't contain elements, minor version set
- qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApi",2,0,qobject_api); // register (qobject) singleton Type for a uri which doesn't contain elements, major version set
- qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApiParented",1,0,qobject_api_engine_parent); // register (parented qobject) singleton Type for a uri which doesn't contain elements
+ qmlRegisterSingletonType("Qt.test",1,0,"Script",script_api); // register (script) singleton Type for an existing uri which contains elements
+ qmlRegisterSingletonType<testQObjectApi>("Qt.test",1,0,"QObject",qobject_api); // register (qobject) for an existing uri for which another singleton Type was previously regd. Should replace!
+ qmlRegisterSingletonType("Qt.test.scriptApi",1,0,"Script",script_api); // register (script) singleton Type for a uri which doesn't contain elements
+ qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApi",1,0,"QObject",qobject_api); // register (qobject) singleton Type for a uri which doesn't contain elements
+ qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApi",1,3,"QObject",qobject_api); // register (qobject) singleton Type for a uri which doesn't contain elements, minor version set
+ qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApi",2,0,"QObject",qobject_api); // register (qobject) singleton Type for a uri which doesn't contain elements, major version set
+ qmlRegisterSingletonType<testQObjectApi>("Qt.test.qobjectApiParented",1,0,"QObject",qobject_api_engine_parent); // register (parented qobject) singleton Type for a uri which doesn't contain elements
}
//#include "testtypes.moc"
}
}
+// Disable this test case since this cannot be compiled with Qt5.
+#if 0
void paint_QPixmapCachedRoundedRect(QPainter &p)
{
static bool first = true;
}
}
}
+#endif
void paint_pathCacheRoundedRect(QPainter &p)
{
{ "QStaticTextWithBackendOptimizations", &paint_QStaticText_optimizations },
{ "CachedText", &paint_QPixmapCachedText },
{ "RoundedRect", &paint_RoundedRect },
- { "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
+ // { "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
{ "PathCacheRoundedRect", &paint_pathCacheRoundedRect },
{ "QPixmap63x63_opaque", &paint_QPixmap63x63_opaque },
{ "QPixmap64x64_opaque", &paint_QPixmap64x64_opaque },
CONFIG += testcase
-QT += qml testlib
+QT += core-private v8-private qml-private testlib
TEMPLATE = app
TARGET = tst_pointers
macx:CONFIG -= app_bundle
****************************************************************************/
#include <qtest.h>
-#include "private/qqmlguard_p.h"
+#include <QtQml/private/qqmlguard_p.h>
#include <QWeakPointer>
class tst_pointers : public QObject
{
window = new QQuickWindow;
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
for ( int i=0; i<8000; i++ ) {
- QQuickRectangle *r =new QQuickRectangle(window->rootItem());
+ QQuickRectangle *r =new QQuickRectangle(window->contentItem());
for ( int j=0; j<10; ++j ) {
new QQuickRectangle(r);
}
TestType1(QObject *parent = 0) : QObject(parent) {}
QQmlListProperty<QObject> resources() {
- return QQmlListProperty<QObject>(this, 0, resources_append);
+ return QQmlListProperty<QObject>(this, 0, resources_append, 0, 0, 0);
}
static void resources_append(QQmlListProperty<QObject> *p, QObject *o) {