diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForm.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml similarity index 87% rename from KelvinDashboardGUI/DapUiQmlWidgetLastActionsForm.qml rename to KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml index f998b04b9965e265ad88d503c554904aa597c92e..6dc8088d818ce6d946eeb0c55172db663981d65b 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForm.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml @@ -5,17 +5,7 @@ import QtQuick.Layouts 1.12 import DapTransactionHistory 1.0 -Rectangle { - width: 400 * pt - border.color: "#B5B5B5" - border.width: 1 * pt - color: "#EDEFF2" - - anchors { - top: parent.top - right: parent.right - bottom: parent.bottom - } +DapUiQmlWidgetLastActionsForm { MouseArea { id: mainMouseArea diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForm.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..27c038bccdac2e0064179f19529f0dc3684d6cc4 --- /dev/null +++ b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForm.ui.qml @@ -0,0 +1,14 @@ +import QtQuick 2.4 + +Rectangle { + width: 400 * pt + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#EDEFF2" + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } +} diff --git a/KelvinDashboardGUI/qml.qrc b/KelvinDashboardGUI/qml.qrc index ceb9d2cdf954afb881471a0bffe30d5857172f50..7a448e8884e56595dba1f1e76cbc22a85ba0c53c 100755 --- a/KelvinDashboardGUI/qml.qrc +++ b/KelvinDashboardGUI/qml.qrc @@ -45,7 +45,6 @@ <file>DapUiQmlWidgetExchangeOrderButtonForm.ui.qml</file> <file>DapUiQmlScreenHistory.qml</file> <file>Resources/Icons/defaul_icon.png</file> - <file>DapUiQmlWidgetLastActionsForm.qml</file> <file>Resources/Icons/ic_scroll-down.png</file> <file>Resources/Icons/ic_scroll-down_hover.png</file> <file>Resources/Icons/ic_scroll-up.png</file> @@ -56,5 +55,7 @@ <file>DapUiQmlWidgetLastActionsHeaderForm.qml</file> <file>DapUiQmlScreenMainWindow.qml</file> <file>DapUiQmlScreenMainWindowForm.ui.qml</file> + <file>DapUiQmlWidgetLastActions.qml</file> + <file>DapUiQmlWidgetLastActionsForm.ui.qml</file> </qresource> </RCC> diff --git a/KelvinDashboardService/DapChainHistoryHandler.cpp b/KelvinDashboardService/DapChainHistoryHandler.cpp index 68a3dd6b63668e3cf6cf1a913a7311057685d82b..e229a148806fa9ab870f6b1a67247e8e86c6b2c9 100644 --- a/KelvinDashboardService/DapChainHistoryHandler.cpp +++ b/KelvinDashboardService/DapChainHistoryHandler.cpp @@ -31,18 +31,8 @@ void DapChainHistoryHandler::onRequestNewHistory(const QMap<QString, QVariant>& if(!result.isEmpty()) { - // TODO: error with "\r\n" - 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+)"; -#endif -#ifdef 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); + QRegExp rx("(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\s+" + "\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)"); int pos = 0; while ((pos = rx.indexIn(result, pos)) != -1)