aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-09-05 17:31:41 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-29 06:12:49 +0200
commit703c808a5649169dd6b9605af273374cd62951d1 (patch)
tree7248cc72bfa632a51c814d6622f0b12a7f2bd443 /tests
parent600e56ad053362dd5d4150f5dec6b93c2fee575b (diff)
Asynchronous component instantiation
This introduces two main: * the QML compiler executes in a separate thread * item instantiation can be interrupted and resumed to allow it to be split across multiple frames. Task-number: QTBUG-21151 Change-Id: I9631c62bb77da3a2e0c37f0da3719533fdce4fef Reviewed-on: http://codereview.qt-project.org/5676 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index 98c5f7d9b0..fa860befbf 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -75,7 +75,9 @@ static void msgHandler(QtMsgType, const char *msg)
void tst_qdeclarativeinstruction::dump()
{
- QDeclarativeCompiledData *data = new QDeclarativeCompiledData(0);
+ QDeclarativeEngine engine;
+ QDeclarativeCompiledData *data = new QDeclarativeCompiledData(&engine);
+
{
QDeclarativeCompiledData::Instruction::Init i;
i.bindingsSize = 0;
@@ -90,10 +92,9 @@ void tst_qdeclarativeinstruction::dump()
ref.className = "Test";
data->types << ref;
- QDeclarativeCompiledData::Instruction::CreateObject i;
+ QDeclarativeCompiledData::Instruction::CreateCppObject i;
i.type = 0;
i.data = -1;
- i.bindingBits = -1;
i.column = 10;
data->addInstruction(i);
}
@@ -309,10 +310,10 @@ void tst_qdeclarativeinstruction::dump()
}
{
- data->datas << "mySignal";
+ data->primitives << "mySignal";
QDeclarativeCompiledData::Instruction::AssignSignalObject i;
- i.signal = 0;
+ i.signal = data->primitives.count() - 1;
data->addInstruction(i);
}
@@ -459,7 +460,7 @@ void tst_qdeclarativeinstruction::dump()
<< "Index\tOperation\t\tData1\tData2\tData3\tComments"
<< "-------------------------------------------------------------------------------"
<< "0\t\tINIT\t\t\t0\t3\t-1\t-1"
- << "1\t\tCREATE\t\t\t0\t-1\t\t\"Test\""
+ << "1\t\tCREATECPP\t\t\t0\t\t\t\"Test\""
<< "2\t\tSETID\t\t\t0\t\t\t\"testId\""
<< "3\t\tSET_DEFAULT"
<< "4\t\tCREATE_COMPONENT\t3"
@@ -487,7 +488,7 @@ void tst_qdeclarativeinstruction::dump()
<< "26\t\tSTORE_INTERFACE\t\t23"
<< "27\t\tSTORE_SIGNAL\t\t2\t3\t\t\"console.log(1921)\""
<< "28\t\tSTORE_SCRIPT_STRING\t24\t3\t1\t4"
- << "29\t\tASSIGN_SIGNAL_OBJECT\t0\t\t\t\"mySignal\""
+ << "29\t\tASSIGN_SIGNAL_OBJECT\t4\t\t\t\"mySignal\""
<< "30\t\tASSIGN_CUSTOMTYPE\t25\t6\t9"
<< "31\t\tSTORE_BINDING\t26\t3\t2"
<< "32\t\tSTORE_COMPILED_BINDING\t27\t2\t4"
@@ -513,6 +514,7 @@ void tst_qdeclarativeinstruction::dump()
messages = QStringList();
QtMsgHandler old = qInstallMsgHandler(msgHandler);
+
data->dumpInstructions();
qInstallMsgHandler(old);