From 881048a286d16b734123e2fc40ade7869734da03 Mon Sep 17 00:00:00 2001 From: luocai Date: Fri, 8 Nov 2024 18:26:33 +0800 Subject: [PATCH] reset module before ota. --- Analyser/Application.cpp | 1 + Analyser/qml/LogView.qml | 4 +++- Analyser/qml/Main.qml | 13 ++----------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Analyser/Application.cpp b/Analyser/Application.cpp index 6cf17d3..56dbfc6 100644 --- a/Analyser/Application.cpp +++ b/Analyser/Application.cpp @@ -478,6 +478,7 @@ bool Application::startOta(const QString &path) { LOG(info) << "device already in ota mode."; } else { if (m_communication) { + resetModule(); m_communication->startOta(); } else { emit otaMessage("请先打开设备"); diff --git a/Analyser/qml/LogView.qml b/Analyser/qml/LogView.qml index 9bbafa4..72de61e 100644 --- a/Analyser/qml/LogView.qml +++ b/Analyser/qml/LogView.qml @@ -8,9 +8,11 @@ ListView { message: "" } } - delegate: Text { + delegate: TextEdit { width: ListView.view.width + readOnly: true text: message + selectByMouse: true wrapMode: Text.Wrap } diff --git a/Analyser/qml/Main.qml b/Analyser/qml/Main.qml index 521ebd2..8da3318 100644 --- a/Analyser/qml/Main.qml +++ b/Analyser/qml/Main.qml @@ -54,18 +54,9 @@ Window { } } Item { - // LogView { - // id: logBrowser - // anchors.fill: parent - // } - ScrollView { - id: view + LogView { + id: logBrowser anchors.fill: parent - TextArea { - id: logBrowser - readOnly: true - wrapMode: TextArea.WordWrap - } } Button { text: "清空"