不是用QStringRef,太容易出错。

Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com
2014-11-24 22:01:30 +08:00
parent 407fe62995
commit 8bb30a0940
24 changed files with 128 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
#include "terminal.h"
Terminal::Terminal()
Terminal::Terminal(QObject *parent):BasicElementInfo(parent)
{
}
@@ -10,7 +10,7 @@ bool Terminal::derivedParse(QXmlStreamReader& reader)
{
QString cn;
cn=reader.attributes().value("rdf:resource").toString();
this->connectivityNode=cn.replace("#","").leftRef(-1);//返回整个字符串的Ref
this->connectivityNode=cn.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"Terminal.ConnectivityNode "<<this->connectivityNode<<"\n";
}
@@ -18,7 +18,7 @@ bool Terminal::derivedParse(QXmlStreamReader& reader)
{
QString ce;
ce=reader.attributes().value("rdf:resource").toString();
this->conductingEquipment=ce.replace("#","").leftRef(-1);//返回整个字符串的Ref
this->conductingEquipment=ce.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"Terminal.ConductingEquipment "<<this->conductingEquipment<<"\n";
}
return true;