1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-19 06:55:24 +02:00

misc: fix some connect warnings when starting with 0 accounts

Change-Id: I15f3a79107912d83a3c1ffe18538c26e37a419e8
This commit is contained in:
Andreas Traczyk 2023-05-19 15:55:08 -04:00 committed by Sébastien Blin
parent 15eb51c7ca
commit b6737f1d50
2 changed files with 5 additions and 3 deletions

View file

@ -33,11 +33,11 @@ ContactAdapter::ContactAdapter(LRCInstance* instance, QObject* parent)
selectableProxyModel_.reset(new SelectableProxyModel(this));
if (lrcInstance_) {
connectSignals();
connect(lrcInstance_,
&LRCInstance::currentAccountIdChanged,
this,
&ContactAdapter::connectSignals);
connectSignals();
}
}
@ -261,8 +261,7 @@ ContactAdapter::updateConnectionInfo()
void
ContactAdapter::connectSignals()
{
if (!lrcInstance_->getCurrentContactModel()) {
qWarning() << Q_FUNC_INFO << "No contact model";
if (lrcInstance_->get_currentAccountId().isEmpty()) {
return;
}

View file

@ -90,6 +90,9 @@ CurrentAccount::get_isLocalModeratorsEnabled()
void
CurrentAccount::setupForAccount()
{
if (lrcInstance_->get_currentAccountId().isEmpty())
return;
connect(lrcInstance_->getCurrentContactModel(),
&ContactModel::bannedStatusChanged,
this,