Skip to content
Snippets Groups Projects
Commit 8de791a0 authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

Merge branch 'bugs-2582' into 'master'

Bugs 2582

See merge request !25
parents 1a52fcab 2e64b9d2
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -29,14 +29,20 @@ void DapChainHistoryHandler::onRequestNewHistory(const QMap<QString, QVariant>&
if(!result.isEmpty())
{
QRegExp rx("((\\w{3}\\s+){2}\\d{1,2}\\s+(\\d{1,2}:*){3}\\s+\\d{4})\\s+(\\w+)\\s+(\\d+)\\s(\\w+)\\s+\\w+\\s+([\\w\\d]+)");
int pos = 0;
while ((pos = rx.indexIn(result, pos)) != -1)
QRegularExpression regular("((\\w{3}\\s+){2}\\d{1,2}\\s+(\\d{1,2}:*){3}\\s+\\d{4})\\s+(\\w+)\\s+(\\d+)\\s(\\w+)\\s+\\w+\\s+([\\w\\d]+)", QRegularExpression::MultilineOption);
QRegularExpressionMatchIterator matchItr = regular.globalMatch(result);
while (matchItr.hasNext())
{
QStringList dataItem = QStringList() << rx.cap(1) << QString::number(DapTransactionStatusConvertor::getStatusByShort(rx.cap(4))) << rx.cap(5) << rx.cap(6) << rx.cap(7) << wallets.at(i).toString();
QRegularExpressionMatch match = matchItr.next();
QStringList dataItem = QStringList()
<< match.captured(1)
<< QString::number(DapTransactionStatusConvertor::getStatusByShort(match.captured(4)))
<< match.captured(5)
<< match.captured(6)
<< match.captured(7)
<< wallets.at(i).toString();
data << dataItem;
pos += rx.matchedLength();
}
}
}
......
......@@ -8,6 +8,7 @@
#include <QProcess>
#include <QDebug>
#include <QList>
#include <QRegularExpression>
#include "DapHistoryType.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment