fix: play button not responding + debug logging to log file
- chatview: QListView::mousePressEvent(event) instead of event->accept() (Qt needs base class press to set pressedIndex for editorEvent to fire) - messagedelegate: GUI_DEBUG replaces qDebug (writes to log file) - voiceplayback: DEBUG_DEBUG/DEBUG_WARN + debug_config.h include - voicemessageencoder: same debug migration - inputbar: GUI_INFO replaces qDebug - messagelist: DEBUG_DEBUG/DEBUG_WARN replaces qDebug/qWarning
This commit is contained in:
1 parent
01012675d0
commit
2687c3ed82
6 files changed
+32
-27
No files matched your search
@@ -206,7 +206,7 @@ void InputBar::onPttReleased() {
|
||||
|
||||
int durationMs = m_recorder->durationMs();
|
||||
if (durationMs < 500) {
|
||||
qDebug("InputBar: voice message too short (%dms), discarded", durationMs);
|
||||
GUI_INFO("InputBar: voice message too short (%dms), discarded", durationMs);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -215,8 +215,8 @@ void InputBar::onPttReleased() {
|
||||
|
||||
QString mediaPath = m_mediaDirBase + "/" + m_channelIdForRecord;
|
||||
VoiceEncoder::ensureMediaDir(mediaPath);
|
||||
qDebug("InputBar::onPttReleased: mediaDir=%s exists=%d channel=%s",
|
||||
qPrintable(mediaPath), QDir(mediaPath).exists(), qPrintable(m_channelIdForRecord));
|
||||
GUI_INFO("InputBar::onPttReleased: mediaDir=%s exists=%d channel=%s",
|
||||
qPrintable(mediaPath), QDir(mediaPath).exists(), qPrintable(m_channelIdForRecord));
|
||||
|
||||
QString fileName = VoiceEncoder::generateFileName();
|
||||
QString filePath = mediaPath + "/" + fileName;
|
||||
@@ -224,7 +224,7 @@ void InputBar::onPttReleased() {
|
||||
int frames = VoiceEncoder::encodeToFile(pcm, 48000, 1, filePath, durationSec);
|
||||
if (frames > 0) {
|
||||
m_voiceFilePath = filePath;
|
||||
qDebug("InputBar: voice message ready: %s (%.1fs)", qPrintable(filePath), durationSec);
|
||||
GUI_INFO("InputBar: voice message ready: %s (%.1fs)", qPrintable(filePath), durationSec);
|
||||
emit sendVoiceMessage(filePath, durationMs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user