fix: voice playback coordinate bug + debug logging + device name encoding
- messagedelegate: editorEvent now adjusts me->pos() by option.rect.topLeft() - voiceplayback: enhanced debug logging for file open/decode/play - messagelist: debug voice file path + exists check - inputbar: debug mediaDir path on record - sound_manager: debug in playRawPcm, decodeDeviceName() for mixed encodings - voiceencoder: debug file write path
This commit is contained in:
1 parent
324d285145
commit
01012675d0
6 files changed
+45
-9
No files matched your search
@@ -16,6 +16,8 @@
|
||||
#include <QMap>
|
||||
#include <QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
|
||||
MessageDelegate::MessageDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent) {}
|
||||
@@ -61,9 +63,12 @@ bool MessageDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
if (!L.isVoice) return false;
|
||||
|
||||
QMouseEvent* me = static_cast<QMouseEvent*>(event);
|
||||
if (!L.voicePlayBtnRect.contains(me->pos())) return false;
|
||||
QPoint localPos = me->pos() - option.rect.topLeft();
|
||||
if (!L.voicePlayBtnRect.contains(localPos)) return false;
|
||||
|
||||
QString filePath = index.data(MsgVoiceFileRole).toString();
|
||||
qDebug("MessageDelegate::editorEvent voice click: filePath=%s exists=%d",
|
||||
qPrintable(filePath), QFile::exists(filePath));
|
||||
if (filePath.isEmpty()) return false;
|
||||
|
||||
ensureVoiceTimer();
|
||||
|
||||
Reference in new issue
Block a user