不是用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 "compensator.h"
Compensator::Compensator()
Compensator::Compensator(QObject *parent):BasicElementInfo(parent)
{
}
@@ -11,7 +11,7 @@ bool Compensator::derivedParse(QXmlStreamReader &reader)
{
QString terminal;
terminal=reader.attributes().value("rdf:resource").toString();
this->terminal=terminal.replace("#","").leftRef(-1);//返回整个字符串的Ref
this->terminal=terminal.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminal<<"\n";
}
return true;