diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-19 12:29:05 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-19 12:29:05 +0100 |
| commit | 50c62c35463b62a3a7acebf9ebe22d44f1c6dca2 (patch) | |
| tree | c56ff15619acf72448b93df218bf36286bc774b3 /demo | |
| parent | 0c1df583acba434e2d7f6905a30fdefe288d0f9d (diff) | |
| download | BobinkQtOpcUa-50c62c35463b62a3a7acebf9ebe22d44f1c6dca2.tar.gz BobinkQtOpcUa-50c62c35463b62a3a7acebf9ebe22d44f1c6dca2.zip | |
Log attribute reads to debug console and replace raw C++ types with Qt equivalents
Connect QOpcUaNode::attributeRead signal to new handler that logs
read results (value or error code) to the debug console via
BobinkClient::statusMessage. Add nameFromAttribute() helper.
Replace const char* arrays with QLatin1StringView, bare string
literals with QStringLiteral, uint with quint32, int with qint32.
Rename statusLog to debugLog in Main.qml for consistency.
Diffstat (limited to 'demo')
| -rw-r--r-- | demo/Main.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/demo/Main.qml b/demo/Main.qml index ca22bb8..7b76fee 100644 --- a/demo/Main.qml +++ b/demo/Main.qml @@ -336,15 +336,15 @@ ApplicationWindow { function appendLog(msg) { let ts = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss"); - statusLog.text += "[" + ts + "] " + msg + "\n"; - statusLog.cursorPosition = statusLog.text.length; + debugLog.text += "[" + ts + "] " + msg + "\n"; + debugLog.cursorPosition = debugLog.text.length; } ScrollView { anchors.fill: parent anchors.margins: 4 TextArea { - id: statusLog + id: debugLog readOnly: true color: "#cccccc" font.family: "monospace" |
