Fix crash in instruction dump
authorAaron Kennedy <aaron.kennedy@nokia.com>
Thu, 23 Feb 2012 08:51:36 +0000 (08:51 +0000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 23 Feb 2012 09:31:24 +0000 (10:31 +0100)
Change-Id: I2cfa9da120a602b52f401dd304b44cd17c47b220
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/declarative/qml/qdeclarativeinstruction.cpp
tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp

index 799357c..8c91980 100644 (file)
@@ -190,7 +190,7 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx)
         qWarning().nospace() << idx << "\t\t" << "STORE_INTERFACE\t\t" << instr->storeObject.propertyIndex;
         break;
     case QDeclarativeInstruction::StoreSignal:
-        qWarning().nospace() << idx << "\t\t" << "STORE_SIGNAL\t\t" << instr->storeSignal.signalIndex << "\t" << instr->storeSignal.value << "\t\t" << primitives.at(instr->storeSignal.value);
+        qWarning().nospace() << idx << "\t\t" << "STORE_SIGNAL\t\t" << instr->storeSignal.signalIndex << "\t" << instr->storeSignal.value;
         break;
     case QDeclarativeInstruction::StoreImportedScript:
         qWarning().nospace() << idx << "\t\t" << "STORE_IMPORTED_SCRIPT\t" << instr->storeScript.value;
@@ -199,7 +199,7 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx)
         qWarning().nospace() << idx << "\t\t" << "STORE_SCRIPT_STRING\t" << instr->storeScriptString.propertyIndex << "\t" << instr->storeScriptString.value << "\t" << instr->storeScriptString.scope << "\t" << instr->storeScriptString.bindingId;
         break;
     case QDeclarativeInstruction::AssignSignalObject:
-        qWarning().nospace() << idx << "\t\t" << "ASSIGN_SIGNAL_OBJECT\t" << instr->assignSignalObject.signal << "\t\t\t" << primitives.at(instr->assignSignalObject.signal);
+        qWarning().nospace() << idx << "\t\t" << "ASSIGN_SIGNAL_OBJECT\t" << instr->assignSignalObject.signal;
         break;
     case QDeclarativeInstruction::AssignCustomType:
         qWarning().nospace() << idx << "\t\t" << "ASSIGN_CUSTOMTYPE\t" << instr->assignCustomType.propertyIndex << "\t" << instr->assignCustomType.primitive << "\t" << instr->assignCustomType.type;
index 072718a..769d385 100644 (file)
@@ -499,9 +499,9 @@ void tst_qdeclarativeinstruction::dump()
         << "24\t\tSTORE_OBJECT\t\t21"
         << "25\t\tSTORE_VARIANT_OBJECT\t22"
         << "26\t\tSTORE_INTERFACE\t\t23"
-        << "27\t\tSTORE_SIGNAL\t\t2\t3\t\t\"console.log(1921)\""
+        << "27\t\tSTORE_SIGNAL\t\t2\t3"
         << "28\t\tSTORE_SCRIPT_STRING\t24\t3\t1\t4"
-        << "29\t\tASSIGN_SIGNAL_OBJECT\t4\t\t\t\"mySignal\""
+        << "29\t\tASSIGN_SIGNAL_OBJECT\t4"
         << "30\t\tASSIGN_CUSTOMTYPE\t25\t6\t9"
         << "31\t\tSTORE_BINDING\t26\t3\t2"
         << "32\t\tSTORE_COMPILED_BINDING\t27\t2\t4"