Merge branch 'fix/ui' into 'release/6.1'

Defer ChatProxy::invalidate() to avoid accessibility crash on macOS (QTBUG-95764)

See merge request BC/public/linphone-desktop!1809
This commit is contained in:
Gaëlle Braud 2026-04-15 10:01:47 +00:00
commit 0c269b7ae5
2 changed files with 11 additions and 1 deletions

View file

@ -125,6 +125,13 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
}
auto linphoneChatRooms = currentAccount->filterChatRooms(Utils::appStringToCoreString(mFilter));
for (auto it : linphoneChatRooms) {
auto state = it->getState();
if (state == linphone::ChatRoom::State::CreationFailed ||
state == linphone::ChatRoom::State::CreationPending ||
state == linphone::ChatRoom::State::TerminationPending ||
state == linphone::ChatRoom::State::Instantiated) {
continue;
}
auto model = createChatCore(it);
chats->push_back(model);
}

View file

@ -23,6 +23,8 @@
#include "ChatList.hpp"
#include "core/App.hpp"
#include <QTimer>
DEFINE_ABSTRACT_OBJECT(ChatProxy)
ChatProxy::ChatProxy(QObject *parent) {
@ -50,7 +52,8 @@ void ChatProxy::setSourceModel(QAbstractItemModel *model) {
emit chatAdded(new ChatGui(chatCore));
}
});
connect(newChatList, &ChatList::dataChanged, this, [this] { invalidate(); });
connect(newChatList, &ChatList::dataChanged, this,
[this] { QTimer::singleShot(0, this, [this] { invalidate(); }); });
newChatList->lUpdate();
}
QSortFilterProxyModel::setSourceModel(newChatList);