Skip to content
Snippets Groups Projects
Commit 66615cfd authored by jonymt's avatar jonymt
Browse files

[*] adapted for Linux systems
parent fd0f0851
No related branches found
No related tags found
1 merge request!8Features 2442
Pipeline #663 passed with stage
in 3 minutes
......@@ -32,8 +32,16 @@ void DapChainHistoryHandler::onRequestNewHistory(const QMap<QString, QVariant>&
if(!result.isEmpty())
{
// TODO: error with "\r\n"
QRegExp rx("(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\r\\n"
"\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)");
QString reg_str;
#ifdef Q_OS_LINUX
reg_str = "(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\n"
"\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)";
#elif Q_OS_WIN
reg_str = "(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\r\\n"
"\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)";
#endif
QRegExp rx(reg_str);
int pos = 0;
while ((pos = rx.indexIn(result, pos)) != -1)
......
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