把大文件拆成小文件

Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com
2014-11-22 16:27:22 +08:00
parent f502f0dc62
commit ccc4c1d90c
6 changed files with 112 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
#include "elementhashtable.h"
//#include <iostream>
#include <iostream>
ElementHashtable::ElementHashtable(QObject *parent) :
QObject(parent)
{
@@ -12,12 +12,12 @@ bool ElementHashtable::child(QXmlStreamReader &reader)
QStringRef elementName;
elementName=reader.name();
BasicElementInfo *pointer=NULL;
if(elementName.toString()=="SubControlArea")
{
SubControlArea sa;
pointer=&sa;
sa.parse(reader);
}
// if(elementName.toString()=="SubControlArea")
// {
// SubControlArea sa;
// pointer=&sa;
// sa.parse(reader);
// }
if(pointer)
{
@@ -49,7 +49,7 @@ bool ElementHashtable::parse(const QString& xmlPath)
}
loop++;
if(loop>20){
break;
// break;
}
}
@@ -60,6 +60,5 @@ bool ElementHashtable::parse(const QString& xmlPath)
}
xmlFile.close();
}
return true;
}