add debug in crashing connect for debug

This commit is contained in:
Gaelle Braud 2026-01-28 14:49:35 +01:00
parent cee29000ec
commit 8d20e2dfb4
6 changed files with 23 additions and 4 deletions

View file

@ -223,10 +223,24 @@ void ChatCore::setSelf(const QSharedPointer<ChatCore> &me) {
mChatModelConnection->makeConnectToModel(
&ChatModel::chatMessagesReceived, [this](const std::shared_ptr<linphone::ChatRoom> &chatRoom,
const std::list<std::shared_ptr<linphone::EventLog>> &eventsLog) {
if (!mChatModel) {
lWarning() << log().arg("Chat model is null !");
return;
} else if (!mChatModelConnection) {
lWarning() << log().arg("Connection between Core and Model is null !");
return;
}
if (mChatModel->getMonitor() != chatRoom) return;
lDebug() << log().arg("CHAT MESSAGE RECEIVED IN CHATROOM") << this << mChatModel->getTitle();
lInfo() << log().arg("Chat message received in chatroom") << this << mChatModel->getTitle();
lInfo() << log().arg("Safe Connection =") << mChatModelConnection.get();
lInfo() << log().arg("this =") << this;
QList<QSharedPointer<EventLogCore>> list;
for (auto &e : eventsLog) {
if (!e) {
lWarning() << log().arg("Event log is null, continue");
continue;
}
auto event = EventLogCore::create(e, chatRoom);
list.push_back(event);
}

View file

@ -92,6 +92,9 @@ void MagicSearchList::setSelf(const QSharedPointer<MagicSearchList> &me) {
mModelConnection->makeConnectToModel(
&MagicSearchModel::searchResultsReceived,
[this](const std::list<std::shared_ptr<linphone::SearchResult>> &results) {
lInfo() << log().arg("Search result received");
lInfo() << log().arg("this =") << this;
lInfo() << log().arg("Safe Connection =") << mModelConnection.get();
auto *contacts = new QList<QSharedPointer<FriendCore>>();
auto ldapContacts = ToolModel::getLdapFriendList();
auto core = CoreModel::getInstance()->getCore();

View file

@ -4362,7 +4362,7 @@ Ablauf: %1</translation>
<context>
<name>MagicSearchList</name>
<message>
<location filename="../../core/search/MagicSearchList.cpp" line="143"/>
<location filename="../../core/search/MagicSearchList.cpp" line="145"/>
<source>device_id</source>
<translation>Telefon</translation>
</message>

View file

@ -4260,7 +4260,7 @@ Expiration : %1</translation>
<context>
<name>MagicSearchList</name>
<message>
<location filename="../../core/search/MagicSearchList.cpp" line="143"/>
<location filename="../../core/search/MagicSearchList.cpp" line="145"/>
<source>device_id</source>
<translation>Phone</translation>
</message>

View file

@ -4235,7 +4235,7 @@ Expiration : %1</translation>
<context>
<name>MagicSearchList</name>
<message>
<location filename="../../core/search/MagicSearchList.cpp" line="143"/>
<location filename="../../core/search/MagicSearchList.cpp" line="145"/>
<source>device_id</source>
<translation>Téléphone</translation>
</message>

View file

@ -37,6 +37,7 @@ ChatMessageModel::ChatMessageModel(const std::shared_ptr<linphone::ChatMessage>
mEphemeralTimer.setInterval(60);
mEphemeralTimer.setSingleShot(false);
if (mMonitor->getEphemeralExpireTime() != 0) mEphemeralTimer.start();
mChatRoom = mMonitor->getChatRoom();
connect(&mEphemeralTimer, &QTimer::timeout, this,
[this] { emit ephemeralMessageTimeUpdated(mMonitor, mMonitor->getEphemeralExpireTime()); });
connect(this, &ChatMessageModel::ephemeralMessageTimerStarted, this, [this] { mEphemeralTimer.start(); });
@ -47,7 +48,8 @@ ChatMessageModel::ChatMessageModel(const std::shared_ptr<linphone::ChatMessage>
// We need to force this signal sending because there is no callback to know when a message has been read
connect(CoreModel::getInstance().get(), &CoreModel::chatRoomRead, this,
[this](const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::ChatRoom> &chatRoom) {
if (chatRoom == mMonitor->getChatRoom()) {
if (!mMonitor || !mChatRoom.lock()) return;
if (chatRoom == mChatRoom.lock()) {
if (mMonitor->isRead()) {
emit messageRead(mMonitor);
}