src/hbutils/document/hbdocumentloader_p.cpp
changeset 5 627c4a0fd0e7
parent 2 06ff229162e9
child 7 923ff622b8b9
--- a/src/hbutils/document/hbdocumentloader_p.cpp	Thu May 27 13:10:59 2010 +0300
+++ b/src/hbutils/document/hbdocumentloader_p.cpp	Fri Jun 11 13:58:22 2010 +0300
@@ -31,6 +31,8 @@
 #include <hbxmlloaderbinaryactions_p.h>
 #include <hbxmlloaderbinarysyntax_p.h>
 
+#include <QDebug>
+
 #ifndef HB_BOOTSTRAPPED
 
 #include <QGraphicsWidget>
@@ -110,6 +112,7 @@
 
 bool HbDocumentLoaderPrivate::createBinary( QIODevice *srcDevice, QIODevice *dstDevice )
 {
+    qDebug() << "createBinary, 1";
     bool result = true;
     syntax->setActions( binaryactions );
 #ifdef DEBUG_TIMES
@@ -121,24 +124,31 @@
     QList<QString> sectionsList;
     QHash< QString, qint64 > sectionsPositionList;
     qint64 startPos = srcDevice->pos();
+    qDebug() << "createBinary, 2";
     if( syntax->scanForSections( srcDevice, sectionsList ) ) {
+        qDebug() << "createBinary, 3";
         srcDevice->seek( startPos );
+        qDebug() << "createBinary, 4";
         result = syntax->load( srcDevice, "" );
         if( !sectionsList.isEmpty() ) {
             for( int i = 0; i < sectionsList.size(); i++ ) {
                 sectionsPositionList[ sectionsList.at( i ) ] = dstDevice->pos();
                 srcDevice->seek( startPos );
+                qDebug() << "createBinary, 5, " << i;
                 result &= syntax->load( srcDevice, sectionsList.at( i ) );
+                qDebug() << "createBinary, 6, " << i;
             }
         }
     } else {
         result = false;
     }
+    qDebug() << "createBinary, 7";
     qint64 sectionsMetaDataPos = dstDevice->pos();
     QDataStream stream( dstDevice );
     stream << sectionsPositionList;
     stream << sectionsMetaDataPos;
 
+    qDebug() << "createBinary, 8";
 
 #ifdef DEBUG_TIMES
     debugPrintX("MYTRACE: DocML create binary, end: %d", debugTime.elapsed());