Skip to content

Commit

Permalink
解决本地结果转换异常奔溃问题
Browse files Browse the repository at this point in the history
1、解决测试结果中有中文存储在本地问题;
2、解决本地结果转换异常奔溃问题;
  • Loading branch information
WilliamYinwei committed Mar 29, 2019
1 parent 23c524f commit 0099d5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Src/TestEngine/outputlocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ OutputLocal::OutputLocal()
bool OutputLocal::OpenOutput()
{
m_out.setDevice(&m_fRst);
m_out.setCodec("UTF-8");

// output to local sqlite database
if(!m_dbSqlite.isOpen()) {
Expand Down
4 changes: 2 additions & 2 deletions Src/TestEngine/outputmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ bool OutputMgr::uploadRst(const QJsonValue& json)

QJsonObject obj = json.toObject();
QString strLongName = obj["longname"].toString();
bool isUpdateRst = obj["time"].isUndefined();
bool isDetailRst = obj["spend"].isUndefined();
bool isUpdateRst = obj["time"].isNull();
bool isDetailRst = obj["spend"].isNull() && (!obj["standard"].isNull());
QStringList lstName = strLongName.split("/");

bool bRst = false;
Expand Down

0 comments on commit 0099d5a

Please sign in to comment.