From 934f1ccd1f00bd2c2e0b080343cdbf234097102e Mon Sep 17 00:00:00 2001 From: evgeny Date: Thu, 1 Oct 2026 16:32:14 +0300 Subject: [PATCH] Use the existing diagnostic macros for desktop PM errors --- tools/chatgui/src/messagelist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/chatgui/src/messagelist.cpp b/tools/chatgui/src/messagelist.cpp index cc7a9900..d55196cb 100644 --- a/tools/chatgui/src/messagelist.cpp +++ b/tools/chatgui/src/messagelist.cpp @@ -505,11 +505,11 @@ MessageList::MessageList(DbManager* db, AudioRecorder* recorder, QWidget *parent if (m_currentChannelId.isEmpty()) return; if (isDmChannel(m_currentChannelId)) { auto* req = (struct dm_file_req*)u_calloc(1, sizeof(struct dm_file_req)); - if (!req) { GUI_ERROR("PM file request allocation failed"); return; } + if (!req) { DEBUG_ERROR(DEBUG_CATEGORY_DM, "PM file request allocation failed"); return; } req->inst = gui_bridge_get_inst(); QByteArray conv = dmConvId(m_currentChannelId).toUtf8(), path = mediaSrc.toUtf8(), name = displayName.toUtf8(); if (path.size() >= (int)sizeof(req->path) || name.size() >= (int)sizeof(req->name)) { - GUI_ERROR("PM attachment path or name is too long"); u_free(req); return; + DEBUG_ERROR(DEBUG_CATEGORY_DM, "PM attachment path or name is too long"); u_free(req); return; } snprintf(req->conv, sizeof(req->conv), "%s", conv.constData()); snprintf(req->path, sizeof(req->path), "%s", path.constData()); @@ -1094,7 +1094,7 @@ void MessageList::onDmMessages(const uint8_t* data, int len) { QJsonParseError error; auto document = QJsonDocument::fromJson(QByteArray((const char*)data + 1 + cl, len - 1 - cl), &error); if (error.error != QJsonParseError::NoError || !document.isArray()) { - GUI_ERROR("Invalid PM history JSON: %s", qPrintable(error.errorString())); return; + DEBUG_ERROR(DEBUG_CATEGORY_DM, "Invalid PM history JSON: %s", qPrintable(error.errorString())); return; } auto* scrollbar = m_view->verticalScrollBar(); bool atBottom = m_model->rowCount() == 0 || scrollbar->value() >= scrollbar->maximum();